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 676265 - GNetworkMonitor leaks a lot of memory
GNetworkMonitor leaks a lot of memory
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-05-17 17:32 UTC by Evan Dandrea
Modified: 2012-05-17 17:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case (553 bytes, application/octet-stream)
2012-05-17 17:36 UTC, Evan Dandrea
Details

Description Evan Dandrea 2012-05-17 17:32:13 UTC
Running the attached program under valgrind and waiting for a lot of network traffic to trigger a constant stream of network-changed events causes GNetworkMonitor to continuously leak memory:

==3255== 4,812 (512 direct, 4,300 indirect) bytes in 4 blocks are definitely los
t in loss record 37 of 42
==3255==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-
linux.so)
==3255==    by 0x4C2B857: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64
-linux.so)
==3255==    by 0x541DAF6: g_realloc (gmem.c:224)
==3255==    by 0x53ECC67: g_ptr_array_maybe_expand (garray.c:1093)
==3255==    by 0x53EDC22: g_ptr_array_add (garray.c:1350)
==3255==    by 0x4EC77C7: read_netlink_messages (gnetworkmonitornetlink.c:237)
==3255==    by 0x4EC7BFA: g_network_monitor_netlink_initable_init (gnetworkmonit
ornetlink.c:143)
==3255==    by 0x4E8B28E: g_initable_new_valist (ginitable.c:228)
==3255==    by 0x4E8B378: g_initable_new (ginitable.c:148)
==3255==    by 0x4E8DFC0: _g_io_module_get_default (giomodule.c:742)
==3255==    by 0x400840: main (in /home/evan/testcase)
Comment 1 Evan Dandrea 2012-05-17 17:36:53 UTC
Created attachment 214270 [details]
test case
Comment 2 Dan Winship 2012-05-17 17:49:59 UTC
stupid bug. fixed in master