GNOME Bugzilla – Bug 615105
Use ffi_prep_closure_loc() rather than ffi_prep_closure()
Last modified: 2015-02-07 16:52:52 UTC
When using ffi_closure_alloc(), we need to use ffi_prep_closure_loc() so we can pass in the executable address of the trampoline separately from the writable address.
Created attachment 158148 [details] [review] Use ffi_prep_closure_loc() rather than ffi_prep_closure()
Created attachment 158149 [details] [review] Correctly use ffi_closure_alloc(), fixing mmap permissions error Here's a squash of the previously attached patch with Dan's original commit that is currently reverted. (The two have to be committed together, squashed or not-squashed.)
Review of attachment 158149 [details] [review]: Looks good. The same change needs to be done for gjs, or (preferably, if time permits) the code needs to be abstracted in such a way that gjs can reuse the g-i code.
Attachment 158149 [details] pushed as 024d7d9 - Correctly use ffi_closure_alloc(), fixing mmap permissions error Corresponding fixes already pushed to gjs by danw. Colin is doing some rewriting in the area which should reduce the complexity and code duplication of the gjs code.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]