emacs-devel
[Top][All Lists]
Advanced

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

Re: seg-fault in unexelf.c


From: Nick Roberts
Subject: Re: seg-fault in unexelf.c
Date: Sun, 23 Jul 2006 00:50:22 +1200

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




reply via email to

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