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 607293 - Usage of new G_VALUE_COLLECT_INIT cause seg. fault.
Usage of new G_VALUE_COLLECT_INIT cause seg. fault.
Status: RESOLVED DUPLICATE of bug 603590
Product: glib
Classification: Platform
Component: gobject
unspecified
Other All
: Normal major
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-01-18 11:43 UTC by Haakon Sporsheim (ieei)
Modified: 2010-01-18 14:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Workaround fix which uses g_slice_alloc0 (503 bytes, patch)
2010-01-18 11:45 UTC, Haakon Sporsheim (ieei)
none Details | Review

Description Haakon Sporsheim (ieei) 2010-01-18 11:43:22 UTC
When using G_VALUE_COLLECT_INIT in g_signal_emit_valist (), the data of each GValue is never initialized which may cause unpredictable results for some GTypes on most platforms (I guess). I'm getting seg. fault on windows using GstMiniObject collector. The GstMiniObject implementation will unref an existing object if set in the GValue structure when collecting, which causes an unref of the pointer which should have been NULL.

My patch uses g_slice_alloc0 () instead of plain g_slice_alloc (). Due to optimization work in this area, this should be revised and maybe fixed in another manner. Maybe in G_VALUE_COLLECT_INIT??

A fix for bug #603590 introduced this bug.
Comment 1 Haakon Sporsheim (ieei) 2010-01-18 11:45:23 UTC
Created attachment 151660 [details] [review]
Workaround fix which uses g_slice_alloc0
Comment 2 Edward Hervey 2010-01-18 13:47:25 UTC
I in fact looked through my 'work' git branch and did have the exact same patch. This should be pushed asap.
Comment 3 Edward Hervey 2010-01-18 14:18:11 UTC
Bugfix has already been reported in bug #603590. Closing this as duplicate

*** This bug has been marked as a duplicate of bug 603590 ***