[FFmpeg-trac] #8347(undetermined:new): memory leaks in apng_write_packet
FFmpeg
trac at avcodec.org
Wed Oct 30 19:54:30 EET 2019
#8347: memory leaks in apng_write_packet
-------------------------------------+-------------------------------------
Reporter: Suhwan | Type: defect
Status: new | Priority: normal
Component: | Version: git-
undetermined | master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
There're memory leaks in apng_write_packet()
How to reproduce:
{{{
% ffmpeg_g -y -i $PoC -loglevel 0 tmp.apng
commit 648b422e171d5eab18f6c6fd346e4050d717b936
ffmpeg version N-95601-g648b422e17 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
{{{
==816== HEAP SUMMARY:
==816== in use at exit: 1,663 bytes in 6 blocks
==816== total heap usage: 3,591 allocs, 3,585 frees, 5,511,380 bytes
allocated
==816==
==816== 741 (88 direct, 653 indirect) bytes in 1 blocks are definitely
lost in loss record 5 of 6
==816== at 0xA031E76: memalign (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==816== by 0xA031F91: posix_memalign (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==816== by 0x59642E9: av_malloc (mem.c:87)
==816== by 0x59642E9: av_mallocz (mem.c:238)
==816== by 0x1CBEA8A: av_packet_alloc (avpacket.c:53)
==816== by 0x1433654: apng_write_packet (apngenc.c:231)
==816== by 0x181A8A4: write_packet (mux.c:754)
==816== by 0x1821265: av_interleaved_write_frame (mux.c:1245)
==816== by 0x4B5E3A: write_packet (ffmpeg.c:816)
==816== by 0x4C58D5: do_video_out (ffmpeg.c:1322)
==816== by 0x4C0F5A: reap_filters (ffmpeg.c:1505)
==816== by 0x48D6B1: transcode_step (ffmpeg.c:4639)
==816== by 0x48D6B1: transcode (ffmpeg.c:4683)
==816== by 0x487DC3: main (ffmpeg.c:4885)
==816==
==816== 890 bytes in 1 blocks are definitely lost in loss record 6 of 6
==816== at 0xA031E76: memalign (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==816== by 0xA031F91: posix_memalign (in /usr/lib/valgrind
/vgpreload_memcheck-amd64-linux.so)
==816== by 0x59642E9: av_malloc (mem.c:87)
==816== by 0x59642E9: av_mallocz (mem.c:238)
==816== by 0x1433C0D: flush_packet (apngenc.c:130)
==816== by 0x14335F2: apng_write_packet (apngenc.c:237)
==816== by 0x181A8A4: write_packet (mux.c:754)
==816== by 0x1821265: av_interleaved_write_frame (mux.c:1245)
==816== by 0x4B5E3A: write_packet (ffmpeg.c:816)
==816== by 0x4C58D5: do_video_out (ffmpeg.c:1322)
==816== by 0x4C0F5A: reap_filters (ffmpeg.c:1505)
==816== by 0x48D6B1: transcode_step (ffmpeg.c:4639)
==816== by 0x48D6B1: transcode (ffmpeg.c:4683)
==816== by 0x487DC3: main (ffmpeg.c:4885)
==816==
==816== LEAK SUMMARY:
==816== definitely lost: 978 bytes in 2 blocks
==816== indirectly lost: 653 bytes in 3 blocks
==816== possibly lost: 0 bytes in 0 blocks
==816== still reachable: 32 bytes in 1 blocks
==816== suppressed: 0 bytes in 0 blocks
==816== Reachable blocks (those to which a pointer was found) are not
shown.
==816== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==816==
==816== For counts of detected and suppressed errors, rerun with: -v
==816== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
}}}
Please confirm.
Thanks
--
Ticket URL: <https://trac.ffmpeg.org/ticket/8347>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list