[Bug 732445] New: aggregator: Many invalid memory access to destroyed GSources in the unit test

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jun 29 12:47:26 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=732445
  GStreamer | gst-plugins-bad | git

           Summary: aggregator: Many invalid memory access to destroyed
                    GSources in the unit test
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: gst-plugins-bad
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: slomo at coaxion.net
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


The problem here is that the main context will destroy the sources itself
already. And in remove_all_sources() we don't prevent the main context from
running, so it could do that while we destroy sources.

Solution would be to use g_idle_new(), store a ref to them somewhere and then
destroy and unref them.


==25016== Invalid read of size 4
==25016==    at 0x5D4C569: g_source_destroy_internal (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==25016==    by 0x4E378B7: _remove_all_sources (gstaggregator.c:387)
==25016==    by 0x4E380A4: _sink_event (gstaggregator.c:468)
==25016==    by 0x581F60E: gst_pad_send_event_unchecked (gstpad.c:5135)
==25016==    by 0x581EE4A: gst_pad_push_event_unchecked (gstpad.c:4833)
==25016==    by 0x581EB36: gst_pad_push_event (gstpad.c:4958)
==25016==    by 0x5067D10: gst_base_src_perform_seek (gstbasesrc.c:1603)
==25016==    by 0x506B496: gst_base_src_event (gstbasesrc.c:2031)
==25016==    by 0x581F60E: gst_pad_send_event_unchecked (gstpad.c:5135)
==25016==    by 0x5819E29: gst_pad_send_event (gstpad.c:5292)
==25016==    by 0x4E38D2E: event_forward_func (gstaggregator.c:821)
==25016==    by 0x581A7B7: gst_pad_forward (gstpad.c:2790)
==25016==    by 0x4E3887B: _src_event (gstaggregator.c:870)
==25016==    by 0x581F60E: gst_pad_send_event_unchecked (gstpad.c:5135)
==25016==    by 0x581EE4A: gst_pad_push_event_unchecked (gstpad.c:4833)
==25016==    by 0x581EB36: gst_pad_push_event (gstpad.c:4958)
==25016==    by 0x5063186: gst_base_sink_send_event (gstbasesink.c:4369)
==25016==    by 0x58017EC: gst_element_send_event (gstelement.c:1560)
==25016==    by 0x57E317C: gst_bin_send_event (gstbin.c:2849)
==25016==    by 0x58017EC: gst_element_send_event (gstelement.c:1560)
==25016==  Address 0x87f760c is 44 bytes inside a block of size 96 free'd
==25016==    at 0x4C29730: free (vg_replace_malloc.c:468)
==25016==    by 0x5D4C2CD: g_source_unref_internal (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==25016==    by 0x5D4EE3F: g_main_context_dispatch (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==25016==    by 0x5D4F047: g_main_context_iterate.isra.24 (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==25016==    by 0x5D4F0EB: g_main_context_iteration (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==25016==    by 0x5847746: gst_task_func (gsttask.c:317)
==25016==    by 0x5D7489B: g_thread_pool_thread_proxy (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==25016==    by 0x5D73F14: g_thread_proxy (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4000.0)
==25016==    by 0x60160C9: start_thread (pthread_create.c:309)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list