From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chris Hall Newsgroups: gmane.emacs.bugs 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 Message-ID: <02035fa87c0c1718bb87cabf307c74cc@lagorda> References: <200802022013.m12KDmuP012794@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Generated by Pantomime 1.2.0) Content-Type: text/plain; charset="us-ascii"; format="flowed" X-Trace: ger.gmane.org 1202046471 31132 80.91.229.12 (3 Feb 2008 13:47:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Feb 2008 13:47:51 +0000 (UTC) Cc: Emacs bugs To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 03 14:48:12 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JLfCe-0004kA-C5 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Feb 2008 14:48:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JLfCC-0004Zw-KP for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Feb 2008 08:47:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JLZ6W-0003Z7-H9 for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2008 02:17:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JLZ6O-0003UV-AK for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2008 02:17:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JLZ6N-0003UN-Rs for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2008 02:17:20 -0500 Original-Received: from out2.smtp.messagingengine.com ([66.111.4.26]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JLZ6M-0002io-FT for bug-gnu-emacs@gnu.org; Sun, 03 Feb 2008 02:17:19 -0500 Original-Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 8B65F8F1D6; Sun, 3 Feb 2008 02:17:01 -0500 (EST) Original-Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 03 Feb 2008 02:17:01 -0500 X-Sasl-enc: vGknV0sIMoIanBbBiHCEPf2NHzDBkutWZUzn4AMqbx2Z 1202023021 Original-Received: from localhost.localdomain (75-95-220-61.hon.clearwire-dns.net [75.95.220.61]) by mail.messagingengine.com (Postfix) with ESMTP id 2B356275F2; Sun, 3 Feb 2008 02:17:01 -0500 (EST) Original-Received: from localhost ([127.0.0.1] helo=localhost.localdomain ident=cjh) by localhost.localdomain with esmtp (Exim 4.50) id 1JLZ9b-0001U0-O0; Sat, 02 Feb 2008 21:20:39 -1000 In-Reply-To: <200802022013.m12KDmuP012794@sallyv1.ics.uci.edu> User-Agent: GNUMail (Version 1.2.0) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Sun, 03 Feb 2008 08:47:40 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:17457 Archived-At: On 2008-02-02 10:13:41 -1000 Dan Nicolaescu 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. Aloha, 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)) =========================================