Opened 5 years ago

Closed 5 years ago

#8305 closed defect (fixed)

memory leaks in ff_frame_pool_get()

Reported by: Suhwan Owned by:
Priority: important Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
There're memory leaks in ff_frame_pool_get()
How to reproduce:

% ffmpeg_g -y -i $PoC -filter_complex maskfun -target dv -loglevel 0 -map 0  tmp.iv8

ffmpeg version N-95446-gfddef964e8 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

==46404== HEAP SUMMARY:
==46404==     in use at exit: 431,530 bytes in 23 blocks
==46404==   total heap usage: 4,253 allocs, 4,230 frees, 6,660,061 bytes allocated
==46404== 
==46404== 431,498 (536 direct, 430,962 indirect) bytes in 1 blocks are definitely lost in loss record 9 of 9
==46404==    at 0x9FE2E76: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==46404==    by 0x9FE2F91: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==46404==    by 0x592E819: av_malloc (mem.c:87)
==46404==    by 0x592E819: av_mallocz (mem.c:238)
==46404==    by 0x59029AD: av_frame_alloc (frame.c:191)
==46404==    by 0x64FD65: ff_frame_pool_get (framepool.c:201)
==46404==    by 0xFB893C: ff_default_get_video_buffer (video.c:90)
==46404==    by 0xB466E1: config_input (vf_maskfun.c:216)
==46404==    by 0x5C7169: avfilter_config_links (avfilter.c:369)
==46404==    by 0x5C604B: avfilter_config_links (avfilter.c:307)
==46404==    by 0x5C604B: avfilter_config_links (avfilter.c:307)
==46404==    by 0x5C604B: avfilter_config_links (avfilter.c:307)
==46404==    by 0x5D8A01: graph_config_links (avfiltergraph.c:261)
==46404==    by 0x5D8A01: avfilter_graph_config (avfiltergraph.c:1279)
==46404== 
==46404== LEAK SUMMARY:
==46404==    definitely lost: 536 bytes in 1 blocks
==46404==    indirectly lost: 430,962 bytes in 21 blocks
==46404==      possibly lost: 0 bytes in 0 blocks
==46404==    still reachable: 32 bytes in 1 blocks
==46404==         suppressed: 0 bytes in 0 blocks
==46404== Reachable blocks (those to which a pointer was found) are not shown.
==46404== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==46404== 
==46404== For counts of detected and suppressed errors, rerun with: -v
==46404== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Please confirm.
Thanks

Attachments (1)

PoC_.pfa (21.3 KB ) - added by Suhwan 5 years ago.
poc

Download all attachments as: .zip

Change History (2)

by Suhwan, 5 years ago

Attachment: PoC_.pfa added

poc

comment:1 by Elon Musk, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.