[FFmpeg-trac] #8286(undetermined:new): memory leaks

FFmpeg trac at avcodec.org
Wed Oct 16 17:53:03 EEST 2019


#8286: memory leaks
-------------------------------------+-------------------------------------
             Reporter:  Suhwan       |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 There are memory leaks
 How to reproduce:
 {{{
 % ffmpeg_g -y -i $PoC -loglevel 0 -map 0 tmp.dnxhd

 ffmpeg version N-95389-gdd01947397 Copyright (c) 2000-2019 the FFmpeg
 developers
 built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
 configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug
 }}}

 Here's Valgrind log

 {{{
 ==11233== HEAP SUMMARY:
 ==11233==     in use at exit: 1,096 bytes in 2 blocks
 ==11233==   total heap usage: 4,677 allocs, 4,675 frees, 10,283,849 bytes
 allocated
 ==11233==
 ==11233== 1,064 bytes in 1 blocks are definitely lost in loss record 2 of
 2
 ==11233==    at 0x9D3CE76: memalign (in /usr/lib/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==11233==    by 0x9D3CF91: posix_memalign (in /usr/lib/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==11233==    by 0x590E87D: av_malloc (mem.c:87)
 ==11233==    by 0x2D4ED80: avcodec_alloc_context3 (options.c:158)
 ==11233==    by 0x215433C: ff_frame_thread_encoder_init
 (frame_thread_encoder.c:198)
 ==11233==    by 0x344D79F: avcodec_open2 (utils.c:740)
 ==11233==    by 0x4A67F1: init_output_stream (ffmpeg.c:3507)
 ==11233==    by 0x48C2DB: transcode_step (ffmpeg.c:4599)
 ==11233==    by 0x48C2DB: transcode (ffmpeg.c:4682)
 ==11233==    by 0x487D53: main (ffmpeg.c:4884)
 ==11233==
 ==11233== LEAK SUMMARY:
 ==11233==    definitely lost: 1,064 bytes in 1 blocks
 ==11233==    indirectly lost: 0 bytes in 0 blocks
 ==11233==      possibly lost: 0 bytes in 0 blocks
 ==11233==    still reachable: 32 bytes in 1 blocks
 ==11233==         suppressed: 0 bytes in 0 blocks
 ==11233== Reachable blocks (those to which a pointer was found) are not
 shown.
 ==11233== To see them, rerun with: --leak-check=full --show-leak-kinds=all
 ==11233==
 ==11233== For counts of detected and suppressed errors, rerun with: -v
 ==11233== ERROR SUMMARY: 82534 errors from 137 contexts (suppressed: 0
 from 0)

 }}}

 ASAN log.
 {{{
 =================================================================
 ==8850==ERROR: LeakSanitizer: detected memory leaks

 Direct leak of 1064 byte(s) in 1 object(s) allocated from:
     #0 0x4de9e8 in posix_memalign (ffmpeg_asan+0x4de9e8)
     #1 0x8593011 in av_malloc ffmpeg/libavutil/mem.c:87:9
     #2 0x463700a in avcodec_alloc_context3
 ffmpeg/libavcodec/options.c:158:28
     #3 0x50f32f9 in avcodec_open2 ffmpeg/libavcodec/utils.c:740:15
     #4 0x61c29b in init_output_stream ffmpeg/fftools/ffmpeg.c:3507:20
     #5 0x5e509d in transcode_step ffmpeg/fftools/ffmpeg.c:4599:19
     #6 0x5e509d in transcode ffmpeg/fftools/ffmpeg.c:4682
     #7 0x5db65b in main ffmpeg/fftools/ffmpeg.c:4884:9
     #8 0x7f13edc0cb96 in __libc_start_main /build/glibc-
 OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

 SUMMARY: AddressSanitizer: 1064 byte(s) leaked in 1 allocation(s).

 }}}
 Please confirm.
 Thanks

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8286>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list