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 604472 - [PATCH] prevent segfault in g_function_info_invoke
[PATCH] prevent segfault in g_function_info_invoke
Status: RESOLVED FIXED
Product: gobject-introspection
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gobject-introspection Maintainer(s)
gobject-introspection Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2009-12-13 20:03 UTC by Saleem Abdulrasool
Modified: 2015-02-07 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-protect-on-null-retval.patch (1.12 KB, patch)
2009-12-13 20:03 UTC, Saleem Abdulrasool
none Details | Review
0002-fix-invoke-tests.patch (1.25 KB, patch)
2009-12-13 20:04 UTC, Saleem Abdulrasool
none Details | Review
fix invoke tests (1.29 KB, patch)
2009-12-15 13:03 UTC, Johan (not receiving bugmail) Dahlin
committed Details | Review
protect on null retval (1.17 KB, patch)
2009-12-15 13:03 UTC, Johan (not receiving bugmail) Dahlin
committed Details | Review

Description Saleem Abdulrasool 2009-12-13 20:03:15 UTC
Created attachment 149648 [details] [review]
0001-protect-on-null-retval.patch

ffi_call does not protect against retval being NULL, resulting in a segfault.  The attached patch asserts that retval is a valid address (!NULL).  The second patch updates the test cases.
Comment 1 Saleem Abdulrasool 2009-12-13 20:04:04 UTC
Created attachment 149649 [details] [review]
0002-fix-invoke-tests.patch
Comment 2 Johan (not receiving bugmail) Dahlin 2009-12-13 23:58:52 UTC
Both patches looks good, I'm just wondering though, ffi might not protect against retval being NULL but we could do that in our api if we wanted to.
Comment 3 Johan (not receiving bugmail) Dahlin 2009-12-15 13:03:02 UTC
The following fixes have been pushed:
27c66d0 fix invoke tests
eef0aba protect on null retval
Comment 4 Johan (not receiving bugmail) Dahlin 2009-12-15 13:03:09 UTC
Created attachment 149760 [details] [review]
fix invoke tests

retval should be a valid pointer
Comment 5 Johan (not receiving bugmail) Dahlin 2009-12-15 13:03:13 UTC
Created attachment 149761 [details] [review]
protect on null retval

ffi_call does not protect against retval being NULL, resulting in a segfault.
Comment 6 André Klapper 2015-02-07 16:49:28 UTC
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]