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 635099 - Memory leak in gdbus introspection when parsing xml
Memory leak in gdbus introspection when parsing xml
Status: VERIFIED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other Linux
: Normal major
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-11-17 19:01 UTC by Eduardo Lima Mitev
Modified: 2011-02-15 08:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
program to reproduce the leak (454 bytes, text/plain)
2010-11-17 19:03 UTC, Eduardo Lima Mitev
Details
valgrind output (5.63 KB, text/plain)
2010-11-17 19:05 UTC, Eduardo Lima Mitev
Details

Description Eduardo Lima Mitev 2010-11-17 19:01:11 UTC
Memory leaks of 608 bytes occurs in every call to 'g_dbus_node_info_new_for_xml'. The problem is the parser not completely freeing some ptr arrays after parsing is done.
Attached is an example program showing the leak. Compile it with 'gcc -o leak `pkg-config --libs --cflags glib-2.0 gio-2.0 gio-unix-2.0` leak.c'. Change the RUNS macro to see how leak increases with number of calls to 'g_dbus_node_info_new_for_xml'.
Comment 1 Eduardo Lima Mitev 2010-11-17 19:03:47 UTC
Created attachment 174708 [details]
program to reproduce the leak
Comment 2 Eduardo Lima Mitev 2010-11-17 19:05:47 UTC
Created attachment 174709 [details]
valgrind output

Obtained with:

G_SLICE=always-malloc G_DEBUG=gc-friendly,resident-modules valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --log-file=vgdump ./leak
Comment 3 Eduardo Lima Mitev 2011-01-26 18:08:36 UTC
Ok, this is not getting any attention. Has somebody confirmed it? I'll try to provide a patch.
Comment 4 Eduardo Lima Mitev 2011-02-15 08:16:34 UTC
Verified, memory leak is gone. Thank you Matthias.