patch for w32 callbacks w/DEP enabled
Timothy Wall
twalljava@dev.java.net
Thu Apr 10 13:00:00 GMT 2008
When Data Execution Protection (DEP) is enabled, w32 callback memory
must be allocated via VirtualAlloc, with the execution bit set.
Otherwise access violation exceptions are thrown when the callback
trampoline instructions are executed. I switch some local code over
to ffi_closure_alloc thinking this was working (since the appropriate
code is in dlmalloc already). Turns out none of it is being used, so
I wound up with a bunch of crashing tests.
This patch enables the right bits when building for windows.
I notice that the mmap (vs vanilla malloc) stuff is otherwise only
enabled for linux; it should probably be part of the configury to
detect whether the mmap stuff is required or might be required on a
particular platform.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.txt
URL: <http://sourceware.org/pipermail/libffi-discuss/attachments/20080410/ef31fea0/attachment.txt>
-------------- next part --------------
More information about the Libffi-discuss
mailing list