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 659838 - incorrect argument types in introspection bindings for g_object_bind_property
incorrect argument types in introspection bindings for g_object_bind_property
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gobject
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-09-22 16:10 UTC by Ben Liblit
Modified: 2011-09-22 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Python script demonstrating the problem (310 bytes, text/plain)
2011-09-22 16:10 UTC, Ben Liblit
  Details
Fix annotations for source/target in g_object_bind_property_* (2.04 KB, patch)
2011-09-22 16:18 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Ben Liblit 2011-09-22 16:10:04 UTC
Created attachment 197262 [details]
Python script demonstrating the problem

g_object_bind_property() claims that its "source" and "target" arguments are gpointers, but these actually must be GObjects.  Unfortunately, the current GObject introspection metadata for this function also claims to accept any gpointer.  If called from, e.g., Python, the C code receives pointers to the raw Python wrapper objects, rather than the real GObjects that these wrappers enclose.  The result is that non-GObjects are passed down to g_object_bind_property(), which results in a crash.

The same problem also affects g_object_bind_property_full() and g_object_bind_property_full_with_closures(), making all three of these unusable via introspection-derived bindings.
Comment 1 Emmanuele Bassi (:ebassi) 2011-09-22 16:18:07 UTC
Created attachment 197263 [details] [review]
Fix annotations for source/target in g_object_bind_property_*

This should fix the issue.
Comment 2 Colin Walters 2011-09-22 16:19:19 UTC
Review of attachment 197263 [details] [review]:

Hah, I just wrote this patch too.  This looks fine.
Comment 3 Emmanuele Bassi (:ebassi) 2011-09-22 16:48:55 UTC
Attachment 197263 [details] pushed as 8e716cb - Fix annotations for source/target in g_object_bind_property_*