[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.60; Seg fault in xfaces.c at line 6703 (Emacs.app on GNUstep)

From: Chris Hall
Subject: Re: 23.0.60; Seg fault in xfaces.c at line 6703 (Emacs.app on GNUstep)
Date: Sat, 02 Feb 2008 21:20:39 -1000
User-agent: GNUMail (Version 1.2.0)

On 2008-02-02 10:13:41 -1000 Dan Nicolaescu <dann@ics.uci.edu> wrote:

Please note the Emacs.app is not included in emacs CVS, so we cannot
help debug this. Your best choice is probably to report this to the
Emacs.app maintainers.

Thank you for taking the time to reply. I appreciate what you are saying, and realize I should have been clearer as to why I submitted the patch to this forum.

I think there are 2 issues here: the presence of the value '0x0' in a field meant to contain a pointer to a face_cache struct, and what the presence of that value causes to happen.

To me it seems that while almost certainly the former is an Emacs.app issue, the latter is more likely an Emacs 23.0.60 issue. I don't know for sure, since I'm not an Emacs or Emacs.app hacker.

I am aware that sometimes some classes of errors are perhaps best allowed to happen and to result in catastrophic failures like segmentation faults, but in this case, were this one of my programs I'd probably consider it a bug. Being unaware of the larger program execution picture, I can't say for sure.

Therefore, on the off chance that you folks also might consider it a bug, in the sense of "unintended and/or undesirable program behavior", I submit the patch below. Since I do not at present have a release form on file with FSF, I hereby assign the copyright(s) for it to FSF.

On my machine, the patch allows execution until the statement:

xfaces.c:6707  error ("Cannot realize default face");

is encountered.


Chris Hall

*** xfaces.c    2007-11-11 07:18:45.000000000 -1000
--- ../src/xfaces.c     2008-02-02 19:24:15.000000000 -1000
*************** face for italic.  */)
*** 6700,6706 ****
      attrs[i] = Qunspecified;
    merge_face_ref (f, attributes, attrs, 1, 0);

!   def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
    if (def_face == NULL)
        if (! realize_basic_faces (f))
--- 6700,6710 ----
      attrs[i] = Qunspecified;
    merge_face_ref (f, attributes, attrs, 1, 0);

!   if (FRAME_FACE_CACHE (f))
!     def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
!   else
!     def_face = NULL;
    if (def_face == NULL)
        if (! realize_basic_faces (f))
*************** realize_default_face (f)
*** 7501,7506 ****
--- 7505,7512 ----
    Lisp_Object frame_font;
    struct face *face;

+   if (!c)
+     return 0;
    /* If the `default' face is not yet known, create it.  */
    lface = lface_from_face_name (f, Qdefault, 0);
    if (NILP (lface))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]