Bug 104727 - Emacs fails if exec-shield is disabled
Emacs fails if exec-shield is disabled
Status: CLOSED RAWHIDE
Product: Red Hat Linux Beta
Classification: Retired
Component: emacs (Show other bugs)
prebeta
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jens Petersen
Jay Turner
:
Depends On:
Blocks: CambridgeBlocker
  Show dependency treegraph
 
Reported: 2003-09-19 16:28 EDT by Michael Fulbright
Modified: 2015-01-07 19:06 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-21 15:41:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Fulbright 2003-09-19 16:28:49 EDT
With the following packages:

   emacs-21.3-6
   kernel-2.4.22-1.2051.nptl (athlon)

if you turn off exec-shield then running emacs yields:

Memory exhausted--use M-x save-some-buffers RET
Comment 1 Roland McGrath 2003-09-19 19:15:33 EDT
The kernel looks like it's doing something funky for brk:

brk(0)                                  = 0x847d000
brk(0x847f000)                          = 0x847d000
mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40677000
rt_sigaction(SIGWINCH, {0x80567a0, [], SA_RESTORER|SA_RESTART, 0x4032fcd8},
{SIG_DFL}, 8) = 0
brk(0)                                  = 0x847d000
Comment 2 Roland McGrath 2003-09-19 19:34:47 EDT
There appears to be a spurious mapping created by exec:

08048000-08195000 r-xp 00000000 03:06 34782      /usr/bin/emacs
08195000-0847d000 rw-p 0014d000 03:06 34782      /usr/bin/emacs
0847d000-0847e000 r-xp 00435000 03:06 34782      /usr/bin/emacs

The third mapping should not be there; it maps the final page of the executable
to where the brk space should be, with a PROT_READ|PROT_EXEC mapping.
Comment 3 Seth Vidal 2003-09-25 22:42:04 EDT
curiously I can cause this on shrike if I use the kernel from fedora core test 2.

same behavior.
Comment 4 Jeremy Katz 2003-10-21 15:41:05 EDT
Seems fine with newer kernel (2.4.22-1.2082.nptl)

Note You need to log in before you can comment on or make changes to this bug.