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 742138 - NMRemoteSettings will crash when quickly destroyed
NMRemoteSettings will crash when quickly destroyed
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal critical
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-12-31 03:51 UTC by Cosimo Cecchi
Modified: 2015-01-05 20:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (901 bytes, patch)
2014-12-31 03:52 UTC, Cosimo Cecchi
none Details | Review

Description Cosimo Cecchi 2014-12-31 03:51:38 UTC
NMRemoteSettings needs to asynchronously initialize a connection object after it's constructed, and it assumes its own instance is still valid in the initialization callback, without taking a self-reference. It's entirely possible that the library client gets rid of the last reference to the NMRemoteSettings before the callback returns; this will cause the callback to access invalid memory and crash.
Comment 1 Cosimo Cecchi 2014-12-31 03:52:13 UTC
Created attachment 293508 [details] [review]
patch

This is against 0.9.10, but it should also apply to git master.
Comment 2 Dan Winship 2015-01-05 20:39:47 UTC
Thanks, fixed in master, nm-1-0, and nm-0-9-10. Although I'm not sure if we're going to do 0.9.10.2 at this point since 1.0 is already out...