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: Patches for CANNOT_DUMP on 23.0.60 (fwd) Date: Sun, 02 Mar 2008 20:25:09 -1000 Message-ID: <30eab8fd35ca2f1a38a9632fe50c81b0@lagorda> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Generated by Pantomime 1.2.0) Content-Type: multipart/mixed; boundary="=_ce13c6bab71330c375fb5514ccd6ae21" X-Trace: ger.gmane.org 1204525325 6383 80.91.229.12 (3 Mar 2008 06:22:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Mar 2008 06:22:05 +0000 (UTC) Cc: "Emacs.apps dev" To: Emacs bugs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 03 07:22:32 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 1JW44E-0007CQ-JS for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Mar 2008 07:22:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JW43h-00087l-Gn for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Mar 2008 01:21:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JW43c-00087M-BN for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2008 01:21:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JW43a-000879-Ik for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2008 01:21:50 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JW43a-000876-Cx for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2008 01:21:50 -0500 Original-Received: from wf-out-1314.google.com ([209.85.200.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JW43a-0001vg-0p for bug-gnu-emacs@gnu.org; Mon, 03 Mar 2008 01:21:50 -0500 Original-Received: by wf-out-1314.google.com with SMTP id 29so6636760wff.24 for ; Sun, 02 Mar 2008 22:21:48 -0800 (PST) Original-Received: by 10.143.159.11 with SMTP id l11mr4940947wfo.186.1204525308237; Sun, 02 Mar 2008 22:21:48 -0800 (PST) Original-Received: from localhost.localdomain ( [75.95.220.61]) by mx.google.com with ESMTPS id 30sm25913192wff.11.2008.03.02.22.21.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 02 Mar 2008 22:21:46 -0800 (PST) User-Agent: GNUMail (Version 1.2.0) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) 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:17641 Archived-At: --=_ce13c6bab71330c375fb5514ccd6ae21 Content-Type: text/plain; charset="us-ascii"; format="flowed" A little more info on the second patch: Between Emacs 23.0.50 and 23.0.60, 'make_terminal_frame' was split into 'make_initial_frame' and 'make_terminal_frame'. Both versions of 'make_terminal_frame' end with a potential call to 'init_frame_faces'. The issue is that the Emacs CANNOT_DUMP build on my machine calls only 'make_initial_frame' during startup, and if 'init_frame_faces' isn't called, Emacs segfaults while attempting to dereference a 'face_cache' struct member containing 0x0. This occurs during startup after entering 'recursive_edit' while evaluating 'display-supports-face-attributes-p'. Maybe on DUMPED platforms 'init_frame_faces' somehow gets called earlier? HTH, Chris Hall ---------- Forwarded message ---------- Date: 2008-03-01 23:07:00 -1000 From: Chris Hall Subject: Patches for CANNOT_DUMP on 23.0.60 Aloha :) I currently use Emacs on Debian Sarge (sorry, RMS! ;) with a custom 2.6 kernel. I have recently also started using the GNUstep port, Emacs.app, on the current stable GNUstep. As of this writing, that would be: gnustep-base-1.14.2, gnustep-back-0.12.1 (libart), gnustep-gui-0.12.1, gnustep-make-2.0.4. Attached please find two patches that resolve: * While building Emacs 23.0.60, I would consistently get the following: batch-byte-compile quail/CCDOSPY.el make[1]: *** [quail/CCDOSPY.elc] Segmentation fault Based on information I received from YAMAMOTO Mitsuharu, the code in the attached patch 'gnustep-callproc.c.diff' seems to resolve that issue. * During startup, Emacs would consistently segfault while attempting to dereference a face_cache struct member containing address 0x0. This appears to be due to a problem where certain lisp functions get called in one order on DUMPED machines, and a different order on CANNOT_DUMP machines. (And again, YAMAMOTO Mitsuharu was very helpful in resolving this.) The attached patch 'gnustep-frame.c.diff' seems to resolve that issue on my machine. FYI, I also needed to increase SYSTEM_PURESIZE_EXTRA in order to avoid the associated warning message on startup. I used 200000 after first trying 100000, which wasn't enough. You may, of course, Free-ly use (or not!) the attached files. Mahalo for your time, Chris Hall --=_ce13c6bab71330c375fb5514ccd6ae21 Content-Transfer-Encoding: base64 Content-Type: text/plain; name="gnustep-callproc.c.diff" Content-Disposition: attachment; filename="gnustep-callproc.c.diff" KioqIGVtYWNzLTIzLjAuMF9OUy05LjByYzMvc3JjL2NhbGxwcm9jLmMJMjAwNy0xMC0yNyAx ODoyMTozNi4wMDAwMDAwMDAgLTEwMDAKLS0tIC4uL3NyYy9jYWxscHJvYy5jCTIwMDgtMDMt MDEgMjE6NDE6NTYuMDAwMDAwMDAwIC0xMDAwCioqKioqKioqKioqKioqKiBzZXRfaW5pdGlh bF9lbnZpcm9ubWVudCAoKQoqKiogMTY1OCwxNjY1ICoqKioKICAgIHJlZ2lzdGVyIGNoYXIg KiplbnZwOwogICNpZm5kZWYgQ0FOTk9UX0RVTVAKICAgIGlmIChpbml0aWFsaXplZCkKLSAj ZW5kaWYKICAgICAgewogICAgICAgIGZvciAoZW52cCA9IGVudmlyb247ICplbnZwOyBlbnZw KyspCiAgCVZwcm9jZXNzX2Vudmlyb25tZW50ID0gRmNvbnMgKGJ1aWxkX3N0cmluZyAoKmVu dnApLAogIAkJCQkgICAgICBWcHJvY2Vzc19lbnZpcm9ubWVudCk7Ci0tLSAxNjU4LDE2Njgg LS0tLQogICAgcmVnaXN0ZXIgY2hhciAqKmVudnA7CiAgI2lmbmRlZiBDQU5OT1RfRFVNUAog ICAgaWYgKGluaXRpYWxpemVkKQogICAgICB7CisgI2Vsc2UKKyAgICAgeworICAgICAgIFZw cm9jZXNzX2Vudmlyb25tZW50ID0gUW5pbDsKKyAjZW5kaWYKICAgICAgICBmb3IgKGVudnAg PSBlbnZpcm9uOyAqZW52cDsgZW52cCsrKQogIAlWcHJvY2Vzc19lbnZpcm9ubWVudCA9IEZj b25zIChidWlsZF9zdHJpbmcgKCplbnZwKSwKICAJCQkJICAgICAgVnByb2Nlc3NfZW52aXJv bm1lbnQpOwo= --=_ce13c6bab71330c375fb5514ccd6ae21 Content-Transfer-Encoding: base64 Content-Type: text/plain; name="gnustep-frame.c.diff" Content-Disposition: attachment; filename="gnustep-frame.c.diff" KioqIGVtYWNzLTIzLjAuMF9OUy05LjByYzMvc3JjL2ZyYW1lLmMJMjAwNy0xMS0xMCAxNzo1 Mzo1Ny4wMDAwMDAwMDAgLTEwMDAKLS0tIC4uL3NyYy9mcmFtZS5jCTIwMDgtMDMtMDEgMjE6 MzE6MzkuMDAwMDAwMDAwIC0xMDAwCioqKioqKioqKioqKioqKiBtYWtlX2luaXRpYWxfZnJh bWUgKHZvaWQpCioqKiA1NTksNTY0ICoqKioKLS0tIDU1OSw1NjkgLS0tLQogICAgRlJBTUVf Q0FOX0hBVkVfU0NST0xMX0JBUlMgKGYpID0gMDsKICAgIEZSQU1FX1ZFUlRJQ0FMX1NDUk9M TF9CQVJfVFlQRSAoZikgPSB2ZXJ0aWNhbF9zY3JvbGxfYmFyX25vbmU7CiAgCisgI2lmZGVm IENBTk5PVF9EVU1QCisgICBpZiAoIW5vbmludGVyYWN0aXZlKQorICAgICBpbml0X2ZyYW1l X2ZhY2VzIChmKTsKKyAjZW5kaWYKKyAKICAgIHJldHVybiBmOwogIH0KICAK --=_ce13c6bab71330c375fb5514ccd6ae21--