Legacy code: mmap zero page: Operation not permitted - where should i start?
I've to deal with old C- Sourcecode. After I managed to compile it, while running it I get the error message
mmap zero page: Operation not permitted
Sometimes followed by an Segmentation fault.
I've read some stuff about the mmap() command, but I can't get around, where this error message comes from and how I should deal with it.
Can I "reena开发者_JS百科ble" it? (The program used to work with an older Linux System).
I'm working with Ubuntu 11.04 and GCC 3.4
Any hints very much appreciated :-)
thanks Markus
Mapping the zero page is disabled by default, as a security measure (doing so can make some NULL
pointer dereference bugs exploitable).
You can re-enable it by setting the vm.mmap_min_addr
sysctl to 0 (also available at /proc/sys/vm/mmap_min_addr
). You should be able to make this the default at boot on Ubuntu by adding vm.mmap_min_addr = 0
to /etc/sysctl.conf
.
精彩评论