After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 615105 - Use ffi_prep_closure_loc() rather than ffi_prep_closure()
Use ffi_prep_closure_loc() rather than ffi_prep_closure()
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-04-07 21:47 UTC by Owen Taylor
Modified: 2015-02-07 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use ffi_prep_closure_loc() rather than ffi_prep_closure() (1.05 KB, patch)
2010-04-07 21:47 UTC, Owen Taylor
none Details | Review
Correctly use ffi_closure_alloc(), fixing mmap permissions error (4.70 KB, patch)
2010-04-07 21:53 UTC, Owen Taylor
committed Details | Review

Description Owen Taylor 2010-04-07 21:47:19 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.
Comment 1 Owen Taylor 2010-04-07 21:47:21 UTC
Created attachment 158148 [details] [review]
Use ffi_prep_closure_loc() rather than ffi_prep_closure()
Comment 2 Owen Taylor 2010-04-07 21:53:11 UTC
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.)
Comment 3 Johan (not receiving bugmail) Dahlin 2010-04-07 23:35:04 UTC
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.
Comment 4 Owen Taylor 2010-04-08 14:51:11 UTC
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.
Comment 5 André Klapper 2015-02-07 16:52:52 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]