From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: seg-fault in unexelf.c Date: Sun, 23 Jul 2006 00:50:22 +1200 Message-ID: <17602.7950.172613.277076@kahikatea.snap.net.nz> References: <17601.29278.738547.379915@kahikatea.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1153572730 28541 80.91.229.2 (22 Jul 2006 12:52:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 22 Jul 2006 12:52:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 22 14:52:08 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G4Gxf-0007d7-AA for ged-emacs-devel@m.gmane.org; Sat, 22 Jul 2006 14:52:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G4Gxe-0000w5-W1 for ged-emacs-devel@m.gmane.org; Sat, 22 Jul 2006 08:52:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G4GxS-0000uT-2b for emacs-devel@gnu.org; Sat, 22 Jul 2006 08:51:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G4GxQ-0000sh-CY for emacs-devel@gnu.org; Sat, 22 Jul 2006 08:51:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G4GxQ-0000sM-1L for emacs-devel@gnu.org; Sat, 22 Jul 2006 08:51:48 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G4Gy2-0002nv-Qj for emacs-devel@gnu.org; Sat, 22 Jul 2006 08:52:27 -0400 Original-Received: from kahikatea.snap.net.nz (p495-tnt1.snap.net.nz [202.124.111.241]) by viper.snap.net.nz (Postfix) with ESMTP id AEA8E776556; Sun, 23 Jul 2006 00:51:44 +1200 (NZST) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id ED7871D3547; Sun, 23 Jul 2006 00:50:23 +1200 (NZST) Original-To: Chip Coldwell In-Reply-To: X-Mailer: VM 7.19 under Emacs 22.0.50.42 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57473 Archived-At: Chip Coldwell writes: > On Sat, 22 Jul 2006, Nick Roberts wrote: > > > > I regularly build on FC5 without optimization and don't have any problems > > (although I haven't done "make bootstrap for a while, the final build uses > > "./temacs -l loadup -batch dump"). > > Which version? Emacs 22.0.50. > If you mean 21.4 (the one that ships with FC5), then all > this means is that, for whatever reason, your kernel is aways setting up > the temacs process with a contiguous address space. The fact that the > Linux kernel could set up a process virtual address space with holes in it > has to be dealt with anyway. Isn't this related to items in the PROBLEMS file (some of which I thought had been solved)?: *** Linux: Segfault during `make bootstrap' under certain recent versions of the Linux kernel. With certain recent Linux kernels (like the one of Redhat Fedora Core 1 and newer), the new "Exec-shield" functionality is enabled by default, which creates a different memory layout that breaks the emacs dumper. Emacs tries to handle this at build time, but if the workaround used fails, these instructions can be useful. The work-around explained here is not enough on Fedora Core 4 (and possible newer). Read the next item. Configure can overcome the problem of exec-shield if the architecture is x86 and the program setarch is present. On other architectures no workaround is known. You can check the Exec-shield state like this: cat /proc/sys/kernel/exec-shield It returns non-zero when Exec-shield is enabled, 0 otherwise. Please read your system documentation for more details on Exec-shield and associated commands. Exec-shield can be turned off with this command: echo "0" > /proc/sys/kernel/exec-shield When Exec-shield is enabled, building Emacs will segfault during the execution of this command: ./temacs --batch --load loadup [dump|bootstrap] To work around this problem, it is necessary to temporarily disable Exec-shield while building Emacs, or, on x86, by using the `setarch' command when running temacs like this: setarch i386 ./temacs --batch --load loadup [dump|bootstrap] *** Fedora Core 4 GNU/Linux: Segfault during dumping. In addition to exec-shield explained above "Linux: Segfault during `make bootstrap' under certain recent versions of the Linux kernel" item, Linux kernel shipped with Fedora Core 4 randomizes the virtual address space of a process. As the result dumping may fail even if you turn off exec-shield. In this case, use the -R option to the setarch command: setarch i386 -R ./temacs --batch --load loadup [dump|bootstrap] or setarch i386 -R make bootstrap -- Nick http://www.inet.net.nz/~nickrob