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 773663 - Wrong GIO annotation on g_dbus_proxy_get_interface_info
Wrong GIO annotation on g_dbus_proxy_get_interface_info
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: introspection
unspecified
Other All
: Normal major
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-10-29 09:12 UTC by Uli Schlachter
Modified: 2018-02-12 11:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdbusproxy: Add some missing (transfer) and (nullable) annotations (4.27 KB, patch)
2018-02-09 11:12 UTC, Philip Withnall
committed Details | Review

Description Uli Schlachter 2016-10-29 09:12:50 UTC
See this snippet from Gio-2.0.gir:

<method name="get_interface_info" c:identifier="g_dbus_proxy_get_interface_info" version="2.26">
        <doc xml:space="preserve">Returns the #GDBusInterfaceInfo, if any, specifying the interface
that @proxy conforms to. See the #GDBusProxy:g-interface-info
property for more details.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">A #GDBusInterfaceInfo or %NULL. Do not unref the returned
object, it is owned by @proxy.</doc>
          <type name="DBusInterfaceInfo" c:type="GDBusInterfaceInfo*"/>
        </return-value>

Doc string implies that ownership transfer is none, while the actual attribute does transfer-ownership="full". This causes a double-free with language bindings.

Long version here: https://github.com/pavouk/lgi/issues/88#issuecomment-255613940
Comment 1 Philip Withnall 2018-02-09 11:12:43 UTC
Created attachment 368177 [details] [review]
gdbusproxy: Add some missing (transfer) and (nullable) annotations

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Comment 2 Philip Withnall 2018-02-09 11:14:16 UTC
Rico, would you mind reviewing this please?
Comment 3 Rico Tzschichholz 2018-02-12 11:16:40 UTC
Review of attachment 368177 [details] [review]:

Looks good
Comment 4 Philip Withnall 2018-02-12 11:34:05 UTC
Thanks for the review. Pushed to master.

Attachment 368177 [details] pushed as f8ee429 - gdbusproxy: Add some missing (transfer) and (nullable) annotations