[Gstreamer-bugs] [Bug 133339] New - registry/gst_structure_from_string() leaks memory
bugzilla-daemon at widget.gnome.org
bugzilla-daemon at widget.gnome.org
Tue Feb 3 12:43:47 PST 2004
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
http://bugzilla.gnome.org/show_bug.cgi?id=133339
Changed by t.i.m at zen.co.uk.
--- shadow/133339 Tue Feb 3 15:43:47 2004
+++ shadow/133339.tmp.12147 Tue Feb 3 15:43:47 2004
@@ -0,0 +1,119 @@
+Bug#: 133339
+Product: GStreamer
+Version: HEAD CVS
+OS: Linux
+OS Details:
+Status: NEW
+Resolution:
+Severity: normal
+Priority: Normal
+Component: gstreamer (core)
+AssignedTo: gstreamer-maint at bugzilla.gnome.org
+ReportedBy: t.i.m at zen.co.uk
+QAContact: gstreamer-maint at bugzilla.gnome.org
+TargetMilestone: HEAD
+URL:
+Summary: registry/gst_structure_from_string() leaks memory
+
+GStreamer seems to leak memory when the registry is read in, as the
+following program shows:
+
+
+int
+main (int argc, char **argv)
+{
+ gst_init(&argc, &argv);
+ return 0;
+}
+
+
+gst_structure_from_string()/_gst_caps_from_string_inplace() seem to be
+the major culprits.
+
+
+Here is the valgrind output:
+
+
+
+==11223== ERROR SUMMARY: 77 errors from 3 contexts (suppressed: 22 from
+3)
+==11223== malloc/free: in use at exit: 1362361 bytes in 8530 blocks.
+==11223== malloc/free: 82200 allocs, 73670 frees, 3529506 bytes
+allocated.
+==11223== For counts of detected errors, rerun with: -v
+==11223== searching for pointers to 8530 not-freed blocks.
+
+
+==11223== checked 8046132 bytes.
+==11223==
+==11223==
+==11223== 36 bytes in 1 blocks are definitely lost in loss record 2 of 12
+==11223== at 0x4002CBEE: malloc (vg_replace_malloc.c:160)
+==11223== by 0x4062E508: nss_parse_service_list (nsswitch.c:529)
+==11223== by 0x4062DD78: __GI___nss_database_lookup (nsswitch.c:133)
+==11223== by 0x4252436B: ???
+==11223== by 0x42525F08: ???
+==11223== by 0x405EE025: getpwuid_r@@GLIBC_2.1.2 (getXXbyYY_r.c:219)
+==11223== by 0x405205BF: g_get_any_init (gutils.c:829)
+==11223== by 0x40520A47: g_get_home_dir (gutils.c:962)
+==11223== by 0x4025E7A4: init_pre (gst.c:444)
+==11223== by 0x4025F1FB: init_popt_callback (gst.c:662)
+==11223==
+==11223==
+==11223== 800 bytes in 20 blocks are possibly lost in loss record 6 of 12
+==11223== at 0x4002D685: calloc (vg_replace_malloc.c:201)
+==11223== by 0x405081C2: g_malloc0 (gmem.c:153)
+==11223== by 0x403728CB: type_node_any_new_W (gtype.c:290)
+==11223== by 0x40372BB4: type_node_fundamental_new_W (gtype.c:392)
+==11223== by 0x40379020: g_type_init_with_debug_flags (gtype.c:3053)
+==11223== by 0x40379149: g_type_init (gtype.c:3111)
+==11223== by 0x4025E6B7: init_pre (gst.c:389)
+==11223== by 0x4025F1FB: init_popt_callback (gst.c:662)
+==11223== by 0x4067B641: (within /lib/libpopt.so.0.0.0)
+==11223== by 0x4067B64F: (within /lib/libpopt.so.0.0.0)
+==11223==
+==11223==
+==11223== 49726 bytes in 35 blocks are possibly lost in loss record 8 of
+12
+==11223== at 0x4002CBEE: malloc (vg_replace_malloc.c:160)
+==11223== by 0x40508161: g_malloc (gmem.c:136)
+==11223== by 0x40513D04: g_strdup (gstrfuncs.c:91)
+==11223== by 0x402936AC: gst_structure_from_string
+(gststructure.c:1346)
+==11223== by 0x40268B18: _gst_caps_from_string_inplace
+(gstcaps.c:1080)
+==11223== by 0x40268C2C: gst_caps_from_string (gstcaps.c:1117)
+==11223== by 0x402AB1B1: gst_xml_registry_parse_padtemplate
+(gstxmlregistry.c:844)
+==11223== by 0x402AB818: gst_xml_registry_text (gstxmlregistry.c:1004)
+==11223== by 0x405076EC: g_markup_parse_context_parse (gmarkup.c:1372)
+==11223== by 0x402AA629: gst_xml_registry_load (gstxmlregistry.c:602)
+==11223==
+==11223==
+==11223== 850111 bytes in 980 blocks are definitely lost in loss record
+12 of 12
+==11223== at 0x4002CBEE: malloc (vg_replace_malloc.c:160)
+==11223== by 0x40508161: g_malloc (gmem.c:136)
+==11223== by 0x40513D04: g_strdup (gstrfuncs.c:91)
+==11223== by 0x402936AC: gst_structure_from_string
+(gststructure.c:1346)
+==11223== by 0x40268B93: _gst_caps_from_string_inplace
+(gstcaps.c:1089)
+==11223== by 0x40268C2C: gst_caps_from_string (gstcaps.c:1117)
+==11223== by 0x402AB1B1: gst_xml_registry_parse_padtemplate
+(gstxmlregistry.c:844)
+==11223== by 0x402AB818: gst_xml_registry_text (gstxmlregistry.c:1004)
+==11223== by 0x405076EC: g_markup_parse_context_parse (gmarkup.c:1372)
+==11223== by 0x402AA629: gst_xml_registry_load (gstxmlregistry.c:602)
+==11223==
+==11223== LEAK SUMMARY:
+==11223== definitely lost: 850147 bytes in 981 blocks.
+==11223== possibly lost: 50526 bytes in 55 blocks.
+==11223== still reachable: 461488 bytes in 7493 blocks.
+==11223== suppressed: 200 bytes in 1 blocks.
+==11223== Reachable blocks (those to which a pointer was found) are not
+shown.
+
+
+Cheers
+-Tim
More information about the Gstreamer-bugs
mailing list