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 515575 - [lame] unit test shows memory leak
[lame] unit test shows memory leak
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal blocker
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-02-10 13:48 UTC by Sebastian Dröge (slomo)
Modified: 2008-02-11 09:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
lame.diff (1.27 KB, patch)
2008-02-11 05:09 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2008-02-10 13:48:21 UTC
Hi,
the pipelines/lame unit test shows some memleaks, one is easy to fix (gst_caps_unref (allowed_caps); around line 1200), the other's are not exactly easy to understand (output below only for these two).

The buffer that is leaked here (and the other thing is the GST_BUFFER_DATA) is pushed downstream in any case so it shouldn't leak at all. Maybe weirdness in core?

Running suite(s): lame
==29321== 
==29321== 356 (80 direct, 276 indirect) bytes in 1 blocks are definitely lost in loss record 3,406 of 3,477
==29321==    at 0x4024AB8: malloc (vg_replace_malloc.c:207)
==29321==    by 0x42C8985: g_malloc (in /usr/lib/libglib-2.0.so.0.1504.0)
==29321==    by 0x42DDBFD: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.1504.0)
==29321==    by 0x42DE404: g_slice_alloc0 (in /usr/lib/libglib-2.0.so.0.1504.0)
==29321==    by 0x41432A6: g_type_create_instance (in /usr/lib/libgobject-2.0.so.0.1504.0)
==29321==    by 0x407C724: gst_mini_object_new (gstminiobject.c:181)
==29321==    by 0x405D2F4: gst_buffer_new (gstbuffer.c:291)
==29321==    by 0x4A9FE09: gst_lame_chain (gstlame.c:1110)
==29321==    by 0x40828C8: gst_pad_chain_unchecked (gstpad.c:3523)
==29321==    by 0x4082F95: gst_pad_push (gstpad.c:3691)
==29321==    by 0x4A4926D: gst_base_transform_chain (gstbasetransform.c:1610)
==29321==    by 0x40828C8: gst_pad_chain_unchecked (gstpad.c:3523)
==29321==    by 0x4082F95: gst_pad_push (gstpad.c:3691)
==29321==    by 0x4A43B80: gst_base_src_loop (gstbasesrc.c:2111)
==29321==    by 0x409CB0F: gst_task_func (gsttask.c:192)
==29321==    by 0x42EA62A: (within /usr/lib/libglib-2.0.so.0.1504.0)
==29321==    by 0x42E899E: (within /usr/lib/libglib-2.0.so.0.1504.0)
==29321==    by 0x433D4FA: start_thread (in /lib/i686/cmov/libpthread-2.7.so)
==29321==    by 0x442693D: clone (in /lib/i686/cmov/libc-2.7.so)
==29321== 
==29321== 
==29321== 8,480 bytes in 1 blocks are possibly lost in loss record 3,474 of 3,477
==29321==    at 0x4024AB8: malloc (vg_replace_malloc.c:207)
==29321==    by 0x42C8985: g_malloc (in /usr/lib/libglib-2.0.so.0.1504.0)
==29321==    by 0x4A9FCF8: gst_lame_chain (gstlame.c:1066)
==29321==    by 0x40828C8: gst_pad_chain_unchecked (gstpad.c:3523)
==29321==    by 0x4082F95: gst_pad_push (gstpad.c:3691)
==29321==    by 0x4A4926D: gst_base_transform_chain (gstbasetransform.c:1610)
==29321==    by 0x40828C8: gst_pad_chain_unchecked (gstpad.c:3523)
==29321==    by 0x4082F95: gst_pad_push (gstpad.c:3691)
==29321==    by 0x4A43B80: gst_base_src_loop (gstbasesrc.c:2111)
==29321==    by 0x409CB0F: gst_task_func (gsttask.c:192)
==29321==    by 0x42EA62A: (within /usr/lib/libglib-2.0.so.0.1504.0)
==29321==    by 0x42E899E: (within /usr/lib/libglib-2.0.so.0.1504.0)
==29321==    by 0x433D4FA: start_thread (in /lib/i686/cmov/libpthread-2.7.so)
==29321==    by 0x442693D: clone (in /lib/i686/cmov/libc-2.7.so)
Comment 1 Sebastian Dröge (slomo) 2008-02-10 16:00:13 UTC
ok, found it. patch comes later :)
Comment 2 Sebastian Dröge (slomo) 2008-02-11 05:09:50 UTC
Created attachment 104892 [details] [review]
lame.diff
Comment 3 Jan Schmidt 2008-02-11 09:10:46 UTC
Thanks - looks good.
Comment 4 Sebastian Dröge (slomo) 2008-02-11 09:13:23 UTC
2008-02-11  Sebastian Dröge  <slomo@circular-chaos.org>

	* ext/lame/gstlame.c: (gst_lame_setup):
	Don't leak the allowed caps.
	* tests/check/pipelines/lame.c: (GST_START_TEST):
	Stop leaking all buffers. Fixes bug #515575.