On Mon, Mar 29, 2010 at 11:04 AM, Dr. David Kirkby <david.kir...@onetel.net> wrote: > When I try the same program on sage.math, it dumps core there too. So I > don't know if sage.math has protection of the stack enabled. If it does, > then it is strange that SELinux has problems, whereas sage.math does not.
The stack is not executable by default (on NX hardware, I assume). You can make your program work by adding something like this: mprotect((void*)((long)&a & ~0xfff), 0x1000, PROT_READ|PROT_WRITE|PROT_EXEC); before the call to fnptr(), which will make the page where a lives executable. I don't think SELinux is installed on sage.math. Gonzalo -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org To unsubscribe from this group, send email to sage-devel+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.