Call to mprotect()
Not sure if this is the correct forum, but anyway I'm having a problem with a call to mprotect.
I have a program which is self-modifying so I want to make sure that the area that my executable is mapped to is both writable and executable. So I find the start of my executing program in memory, and the size, and set this are using mprotect.
Now this works on Debian but on Mandrake 9.2, it causes a signal 11 segmentation fault, which I guess is the system saying I can't change the permissions of the memory.
Is this something in the setup of Mandrake, something to do with user priveldges or something more low level? IS there something you can change in Mandrake setup to make it work?
Cheers,
Tim
|