Bug 104727 - Emacs fails if exec-shield is disabled
Summary: Emacs fails if exec-shield is disabled
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux Beta
Classification: Retired
Component: emacs
Version: prebeta
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On:
Blocks: CambridgeBlocker
TreeView+ depends on / blocked
 
Reported: 2003-09-19 20:28 UTC by Michael Fulbright
Modified: 2015-01-08 00:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-10-21 19:41:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael Fulbright 2003-09-19 20:28:49 UTC
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 23:15:33 UTC
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 23:34:47 UTC
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-26 02:42:04 UTC
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 19:41:05 UTC
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.