Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 221281 - app-editors/emacs-{18.59-r4,21.4-r15}: temacs segfaults in dump-emacs w/ kernel 2.6.25
Summary: app-editors/emacs-{18.59-r4,21.4-r15}: temacs segfaults in dump-emacs w/ kern...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Emacs project
Depends on: CVE-2008-2142
Blocks: kernel-2.6.25
  Show dependency tree
Reported: 2008-05-10 23:00 UTC by Ulrich Müller
Modified: 2008-06-02 10:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---

Stack trace (stacktrace-21.4,2.71 KB, text/plain)
2008-05-10 23:02 UTC, Ulrich Müller
Kernel config (config-2.6.25,45.17 KB, text/plain)
2008-05-10 23:04 UTC, Ulrich Müller
emerge --info (emerge-info,3.81 KB, text/plain)
2008-05-10 23:05 UTC, Ulrich Müller
Patch for 21.4: 17_all_bss-heap-gap.patch (17_all_bss-heap-gap.patch,4.88 KB, patch)
2008-05-10 23:18 UTC, Ulrich Müller
Details | Diff
Patch for 18.59: 05_all_bss-heap-gap.patch (05_all_bss-heap-gap.patch,4.31 KB, patch)
2008-05-11 00:36 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2008-05-10 23:00:31 UTC
Building of app-editors/emacs-21.4-r15 (also 18.59-r4) fails with a segmentation fault in dump-emacs / unexec. This is with the system running gentoo-sources-2.6.25-r2. The problem does not show up with 2.6.24-r7.

LC_ALL=C ./temacs -batch -l loadup dump
Finding pointers to doc strings...
Finding pointers to doc strings...done
Wrote /var/tmp/portage/app-editors/emacs-21.4-r15/work/emacs-21.4/lib-src/fns-21.4.1.el
Dumping under names emacs and emacs-21.4.1
make[1]: *** [emacs] Segmentation fault
make[1]: *** Deleting file `emacs'
make[1]: Leaving directory `/var/tmp/portage/app-editors/emacs-21.4-r15/work/emacs-21.4/src'
make: *** [src] Error 2
Comment 1 Ulrich Müller gentoo-dev 2008-05-10 23:02:35 UTC
Created attachment 152785 [details]
Stack trace
Comment 2 Ulrich Müller gentoo-dev 2008-05-10 23:04:03 UTC
Created attachment 152787 [details]
Kernel config
Comment 3 Ulrich Müller gentoo-dev 2008-05-10 23:05:01 UTC
Created attachment 152789 [details]
emerge --info
Comment 4 Ulrich Müller gentoo-dev 2008-05-10 23:18:45 UTC
Created attachment 152791 [details, diff]
Patch for 21.4: 17_all_bss-heap-gap.patch

Patch for Emacs 21.4, backported from Emacs 22.

(A patch for Emacs 18.59 will follow later.)
Comment 5 Ulrich Müller gentoo-dev 2008-05-11 00:36:17 UTC
Created attachment 152799 [details, diff]
Patch for 18.59: 05_all_bss-heap-gap.patch
Comment 6 Ulrich Müller gentoo-dev 2008-05-11 01:23:05 UTC
The breakage is caused by the "randomize brk()" patch.
See the LKML, <>:

| This is known to break older versions of some emacs variants, whose
| dumper code assumed that the last variable declared in the program is
| equal to the start of the dynamically allocated memory region.

The corresponding kernel parameter is accessible via /proc/sys/kernel/randomize_va_space, the breakage occurs if its value is 2.
Comment 7 Ulrich Müller gentoo-dev 2008-05-11 21:52:02 UTC
Fixed in emacs-18.59-r5 and emacs-21.4-r16. Leave this bug open until the fixed versions are marked stable (wrt tracker bug 218127).
Comment 8 Ulrich Müller gentoo-dev 2008-05-13 06:18:46 UTC
Stabilisation of emacs-21.4-r17 is handled in bug 221197.
Comment 9 Ulrich Müller gentoo-dev 2008-05-29 16:50:21 UTC
@x86: Please stabilise emacs-18.59-r5.
Preferably it should be tested with kernel 2.6.25.
Comment 10 Christian Faulhammer (RETIRED) gentoo-dev 2008-05-31 13:40:12 UTC
x86 stable, closing