[Bug 777539] New: flacdec: memory leak in gst_flac_dec_write

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jan 20 15:33:12 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=777539

            Bug ID: 777539
           Summary: flacdec: memory leak in gst_flac_dec_write
    Classification: Platform
           Product: GStreamer
           Version: unspecified
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: hanno at hboeck.de
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

file:
https://samples.mplayerhq.hu/ffmpeg-bugs/roundup/issue810/milk_30sec.flac

This one requires
ASAN_OPTIONS="fast_unwind_on_malloc=0"
and
G_SLICE=always-malloc
set to be visible.

asan trace:
==2641==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 272 byte(s) in 1 object(s) allocated from:
    #0 0x4cbbb8 in malloc (/usr/bin/gst-discoverer-1.0+0x4cbbb8)
    #1 0x7f6a4badf768 in g_malloc
/var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gmem.c:94
    #2 0x7f6a4baf74d2 in g_slice_alloc
/var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gslice.c:1025
    #3 0x7f6a4c74566c in gst_buffer_new
/f/gstreamer/gstreamer/gst/gstbuffer.c:797:12
    #4 0x7f6a4c74566c in gst_buffer_new_allocate
/f/gstreamer/gstreamer/gst/gstbuffer.c:845
    #5 0x7f6a3eb97ca0 in gst_flac_dec_write
/f/gstreamer/gst-plugins-good/ext/flac/gstflacdec.c:647:7
    #6 0x7f6a3eb97ca0 in gst_flac_dec_write_stream
/f/gstreamer/gst-plugins-good/ext/flac/gstflacdec.c:727
    #7 0x7f6a3e96276a  (/usr/lib64/libFLAC.so.8+0x2976a)
    #8 0x7f6a3e965987 in FLAC__stream_decoder_process_single
(/usr/lib64/libFLAC.so.8+0x2c987)
    #9 0x7f6a3eb95876 in gst_flac_dec_handle_frame
/f/gstreamer/gst-plugins-good/ext/flac/gstflacdec.c:795:8
    #10 0x7f6a4d9014b8 in gst_audio_decoder_handle_frame
/f/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:1468:10
    #11 0x7f6a4d8fe3ff in gst_audio_decoder_push_buffers
/f/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:1566:11
    #12 0x7f6a4d8ff2b4 in gst_audio_decoder_chain_forward
/f/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:1680:9
    #13 0x7f6a4d902658 in gst_audio_decoder_chain
/f/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:1940:11
    #14 0x7f6a4c83a367 in gst_pad_chain_data_unchecked
/f/gstreamer/gstreamer/gst/gstpad.c:4204:11
    #15 0x7f6a4c83db37 in gst_pad_push_data
/f/gstreamer/gstreamer/gst/gstpad.c:4456:9
    #16 0x7f6a4c83d1af in gst_pad_push
/f/gstreamer/gstreamer/gst/gstpad.c:4575:9
    #17 0x7f6a4cd5fbcf in gst_base_parse_push_frame
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:2554:13
    #18 0x7f6a4cd67e8b in gst_base_parse_handle_and_push_frame
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:2371:10
    #19 0x7f6a4cd67e8b in gst_base_parse_finish_frame
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:2712
    #20 0x7f6a3f5fa32a in gst_flac_parse_handle_frame
/f/gstreamer/gst-plugins-good/gst/audioparsers/gstflacparse.c:874:13
    #21 0x7f6a4cd8d7d4 in gst_base_parse_handle_buffer
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:2179:9
    #22 0x7f6a4cd8b78b in gst_base_parse_scan_frame
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:3482:11
    #23 0x7f6a4cd882ee in gst_base_parse_loop
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:3561:9
    #24 0x7f6a4c904973 in gst_task_func
/f/gstreamer/gstreamer/gst/gsttask.c:334:5
    #25 0x7f6a4bb01b2d in g_thread_pool_thread_proxy
/var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307
    #26 0x7f6a4bb01154 in g_thread_proxy
/var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784
    #27 0x7f6a4b57f453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #28 0x7f6a4b0af5dc in clone (/lib64/libc.so.6+0xe75dc)

Indirect leak of 262291 byte(s) in 1 object(s) allocated from:
    #0 0x4cbbb8 in malloc (/usr/bin/gst-discoverer-1.0+0x4cbbb8)
    #1 0x7f6a4badf768 in g_malloc
/var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gmem.c:94
    #2 0x7f6a4baf74d2 in g_slice_alloc
/var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gslice.c:1025
    #3 0x7f6a4c7202fc in _sysmem_new_block
/f/gstreamer/gstreamer/gst/gstallocator.c:416:9
    #4 0x7f6a4c7202fc in default_alloc
/f/gstreamer/gstreamer/gst/gstallocator.c:515
    #5 0x7f6a4c71ea32 in gst_allocator_alloc
/f/gstreamer/gstreamer/gst/gstallocator.c:313:11
    #6 0x7f6a4c74562c in gst_buffer_new_allocate
/f/gstreamer/gstreamer/gst/gstbuffer.c:838:11
    #7 0x7f6a3eb97ca0 in gst_flac_dec_write
/f/gstreamer/gst-plugins-good/ext/flac/gstflacdec.c:647:7
    #8 0x7f6a3eb97ca0 in gst_flac_dec_write_stream
/f/gstreamer/gst-plugins-good/ext/flac/gstflacdec.c:727
    #9 0x7f6a3e96276a  (/usr/lib64/libFLAC.so.8+0x2976a)
    #10 0x7f6a3e965987 in FLAC__stream_decoder_process_single
(/usr/lib64/libFLAC.so.8+0x2c987)
    #11 0x7f6a3eb95876 in gst_flac_dec_handle_frame
/f/gstreamer/gst-plugins-good/ext/flac/gstflacdec.c:795:8
    #12 0x7f6a4d9014b8 in gst_audio_decoder_handle_frame
/f/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:1468:10
    #13 0x7f6a4d8fe3ff in gst_audio_decoder_push_buffers
/f/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:1566:11
    #14 0x7f6a4d8ff2b4 in gst_audio_decoder_chain_forward
/f/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:1680:9
    #15 0x7f6a4d902658 in gst_audio_decoder_chain
/f/gstreamer/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c:1940:11
    #16 0x7f6a4c83a367 in gst_pad_chain_data_unchecked
/f/gstreamer/gstreamer/gst/gstpad.c:4204:11
    #17 0x7f6a4c83db37 in gst_pad_push_data
/f/gstreamer/gstreamer/gst/gstpad.c:4456:9
    #18 0x7f6a4c83d1af in gst_pad_push
/f/gstreamer/gstreamer/gst/gstpad.c:4575:9
    #19 0x7f6a4cd5fbcf in gst_base_parse_push_frame
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:2554:13
    #20 0x7f6a4cd67e8b in gst_base_parse_handle_and_push_frame
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:2371:10
    #21 0x7f6a4cd67e8b in gst_base_parse_finish_frame
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:2712
    #22 0x7f6a3f5fa32a in gst_flac_parse_handle_frame
/f/gstreamer/gst-plugins-good/gst/audioparsers/gstflacparse.c:874:13
    #23 0x7f6a4cd8d7d4 in gst_base_parse_handle_buffer
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:2179:9
    #24 0x7f6a4cd8b78b in gst_base_parse_scan_frame
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:3482:11
    #25 0x7f6a4cd882ee in gst_base_parse_loop
/f/gstreamer/gstreamer/libs/gst/base/gstbaseparse.c:3561:9
    #26 0x7f6a4c904973 in gst_task_func
/f/gstreamer/gstreamer/gst/gsttask.c:334:5
    #27 0x7f6a4bb01b2d in g_thread_pool_thread_proxy
/var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307
    #28 0x7f6a4bb01154 in g_thread_proxy
/var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784
    #29 0x7f6a4b57f453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #30 0x7f6a4b0af5dc in clone (/lib64/libc.so.6+0xe75dc)

SUMMARY: AddressSanitizer: 262563 byte(s) leaked in 2 allocation(s).

-- 
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