Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Do not attempt to make the heap writeable
authorGabriel Corona <gabriel.corona@loria.fr>
Tue, 28 Jul 2015 12:15:03 +0000 (14:15 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Tue, 28 Jul 2015 12:50:15 +0000 (14:50 +0200)
commit82c72f9be90d60c769166a4ee8453ec561118e47
treed268cc9820d254c1928c681674db37e44b942669
parent7ab35b7d7e11d4a454b296b185770098104ebda9
[mc] Do not attempt to make the heap writeable

We add a mprotect()-based gap after the stacks (which are created on
the heap) in order to detect stack overflows but when the stack is
destroyed, the protection is removed by making the pages (part of the
heap) RW and executable. This is not a good idea :)

Apparently, it fails on Ubuntu because of PaX restrictions on
mprotect(): the mprotect calls fails, the pages are still unreadable
and unwritable and the application segfaults when a new allocation
attemps to use it.
src/simix/smx_context.c