#10701: memory leaks at ffmpeg6-1/libavutil/mem.c:105:9 in av_malloc in FFmpeg
-------------------------------------+-------------------------------------
             Reporter:               |                     Type:  defect
  ZengYunxiang                       |
               Status:  new          |                 Priority:  normal
            Component:  avutil       |                  Version:  git-
                                     |  master
             Keywords:  bugs         |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:

 Dear developers,
 I found the following memory leaks on FFmpeg6.1 when using colorcorrect
 filter, please confirm.

 The poc file(poc8ffmpeg) will be attached to this ticket.

 How to reproduce:
 {{{
 git clone https://github.com/FFmpeg/FFmpeg.git ffmpeg6-1
 cd ffmpeg6-1
 git checkout 466799d
 ./configure --cc=clang --cxx=clang++ --ld=clang --enable-debug --toolchain
 =clang-asan
 make -j30

 ./ffmpeg_g -y -i poc8ffmpeg -filter_complex colorcorrect tmp.mp4
 }}}
 ASAN Log:
 {{{
 =================================================================
 ==1141095==ERROR: LeakSanitizer: detected memory leaks

 Direct leak of 1024 byte(s) in 1 object(s) allocated from:
     #0 0x560cd4de6ab7 in __interceptor_posix_memalign
 (/afltest/ffmpeg6-1/ffmpeg_g+0x925ab7) (BuildId:
 235e8d23658b9f137a6f44e3f2d1bddad7c9bf95)
     #1 0x560cd841f753 in av_malloc
 /afltest/ffmpeg6-1/libavutil/mem.c:105:9
     #2 0x560cd841f753 in av_mallocz
 /afltest/ffmpeg6-1/libavutil/mem.c:256:17
     #3 0x560cd841f753 in av_calloc
 /afltest/ffmpeg6-1/libavutil/mem.c:267:12
     #4 0x560cd4bde02f in config_input
 /afltest/ffmpeg6-1/libavfilter/vf_colorcorrect.c:461:21

 Direct leak of 1024 byte(s) in 1 object(s) allocated from:
     #0 0x560cd4de6ab7 in __interceptor_posix_memalign
 (/afltest/ffmpeg6-1/ffmpeg_g+0x925ab7) (BuildId:
 235e8d23658b9f137a6f44e3f2d1bddad7c9bf95)
     #1 0x560cd841f753 in av_malloc
 /afltest/ffmpeg6-1/libavutil/mem.c:105:9
     #2 0x560cd841f753 in av_mallocz
 /afltest/ffmpeg6-1/libavutil/mem.c:256:17
     #3 0x560cd841f753 in av_calloc
 /afltest/ffmpeg6-1/libavutil/mem.c:267:12
     #4 0x560cd4bddfc9 in config_input
 /afltest/ffmpeg6-1/libavfilter/vf_colorcorrect.c:457:21

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

 ffmpeg version:
 {{{
 # ./ffmpeg -version
 ffmpeg version n6.1-3-g466799d4f5 Copyright (c) 2000-2023 the FFmpeg
 developers
 built with clang version 9.0.0 (https://github.com/llvm-mirror/llvm
 c62b24f070c9a4bb1a76409e623042a740cac4cd)
 configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug
 --toolchain=clang-asan
 libavutil      58. 29.100 / 58. 29.100
 libavcodec     60. 31.102 / 60. 31.102
 libavformat    60. 16.100 / 60. 16.100
 libavdevice    60.  3.100 / 60.  3.100
 libavfilter     9. 12.100 /  9. 12.100
 libswscale      7.  5.100 /  7.  5.100
 libswresample   4. 12.100 /  4. 12.100
 }}}
 Credit:
 {{{
 Zeng Yunxiang
 Song Jiaxuan
 }}}
 Thanks for your time!
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10701>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to