emacs-devel
[Top][All Lists]
Advanced

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

Re: Unable to bootstrap GNU Emacs 21.3 (SOLVED)


From: David PONCE
Subject: Re: Unable to bootstrap GNU Emacs 21.3 (SOLVED)
Date: Mon, 27 Oct 2003 11:47:46 +0100 (CET)

Hi All,

To solve this annoying problem, I also posted a bug report on the
Redhat Fedora mailing list.  And I got an explanation on what happened
and on how to solve the issue.  I think it could be worth to note that
somewhere, perhaps in the etc/PROBLEMS file.

In fact, in recent Linux kernels, there is a new "Exec-shield"
functionality:

"[...] Exec-shield is a security-enhancing modification to the Linux
kernel that makes large parts of specially-marked programs _ including
their stack _ not executable. This can reduce the potential damage of
some security holes. Exec-shield is related to the older "non-exec
stack patch" but has the potential to provide greater protection.

Exec-shield can also randomize the virtual memory addresses at which
certain binaries are loaded. This randomized VM mapping makes it more
difficult for a malicious application to improperly access code or
data based on knowledge of the code or data's virtual address.

[...]

Exec-shield functionality is available only to binaries that have been
built (and marked) using the toolchain (compiler, assembler, linker)
available with Fedora [...]"

The problem is that Exec-shield enables a different memory layout that
breaks the emacs dumper.

Notice that this potentially affects all versions of Emacs.  On my system
building both Emacs 21.3.1 and latest 21.3.50.1 failed with segfault on:

temacs --batch --load loadup [dump|bootstrap]

There are two solutions to build Emacs:

- Turn off Exec-shield:
  
  echo 0 > /proc/sys/kernel/exec-shield

- Temporarily disable Exec-shield while building Emacs, using the
  `setarch' command:

  setarch i386 ./configure ...
  setarch i386 make ...

Hope this will help.

David





reply via email to

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