------- Additional Comments From Hans dot Boehm at hp dot com 2005-02-09 05:38 ------- I believe that the GC alters permissions on the heap only if either - It is running in incremental mode, or - It is built with USE_MMAP, and thus uses mmap to allocate the heap. I think we talked about always doing the latter, but we don't. Thus I think the heap is allocated with sbrk. If the kernel no longer gives execute permission for sbrk memory, then that would propagate through to the Java heap. That would presunably break libffi. It should be possible to confirm a lot of this with strace.
I think the collector is configured to disable execute permission whenever it resets permissions. Thus if we used mmap, libffi would presumably break consistently everywhere it tries to put trampolines in the heap. (It doesn't need trampolines on all platforms.) If all of this is correct, then building the collector with USE_MMAP, and telling it to enable execute permission, might be a work-around. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19823