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 659070 - gdbus-codegen' generated code segfaults when remote property changes
gdbus-codegen' generated code segfaults when remote property changes
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gdbus
2.29.x
Other Linux
: Normal major
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-09-14 16:19 UTC by Tomas Bzatek
Modified: 2011-09-14 17:04 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
proposed patch (1.42 KB, patch)
2011-09-14 16:19 UTC, Tomas Bzatek
committed Details | Review

Description Tomas Bzatek 2011-09-14 16:19:39 UTC
Created attachment 196522 [details] [review]
proposed patch

glib2-2.29.90-1.fc17.x86_64

Application segfaults when gdbus proxy is constructed and property on the remote d-bus service is changed. See the patch commit message.

I only hope people are always calling gdbus-codegen on package build.
Comment 1 David Zeuthen (not reading bugmail) 2011-09-14 16:42:24 UTC
Review of attachment 196522 [details] [review]:

Patch looks good to me. Note that this only happens with D-Bus services that does not include the value in the PropertiesChanged signal (generally a very bad idea). Please commit to master and glib-2-30.
Comment 2 David Zeuthen (not reading bugmail) 2011-09-14 16:43:11 UTC
(In reply to comment #0)
> I only hope people are always calling gdbus-codegen on package build.

They are supposed to, yeah - git nor tarballs should ever contain generated code. But I'm sure a lot of people will get it wrong, but that's their problem :-)
Comment 3 Tomas Bzatek 2011-09-14 17:04:14 UTC
Comment on attachment 196522 [details] [review]
proposed patch

Committed, thanks

commit 659b287a92d951d7121584587cb7aefa28e88416
Author: Tomas Bzatek <tbzatek@redhat.com>
Date:   Wed Sep 14 19:02:01 2011 +0200

    gdbus-codegen: Fix segfault when remote property is invalidated
    
    The 'key' variable is no longer valid outside the cycle, owned and
    probably already freed by GVariant. This causes apps to segfault
    when proxy is constructed and a property on remote d-bus service
    changes (actually is invalidated). Looks like a typo anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659070