[FFmpeg-trac] #1108(avutil:new): Always using "default" memory handling from mem.c against own implementation of memory allocator and deallocator.
FFmpeg
trac at avcodec.org
Mon Apr 2 16:38:37 CEST 2012
#1108: Always using "default" memory handling from mem.c against own
implementation of memory allocator and deallocator.
-------------------------------------+-------------------------------------
Reporter: mato | Owner: michael
Type: defect | Status: new
Priority: normal | Component: avutil
Version: git-master | Resolution:
Keywords: memory, | Blocked By:
AVDictionary, alloc, free | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by mato):
If You analize log below You can see that dyn_buf_write alloc memory in
libavformat and
av_dict_free free in libavutil. If I redefine av_malloc and av_free
dyn_buf_write use my implementation but dyn_buf_write use default
implementation. That is a problem.
==18131== Invalid free() / delete / delete[]
==18131== at 0x4025BF0: free (vg_replace_malloc.c:366)
==18131== by 0x48B6583: av_dict_free (in
/media/truecrypt1/work/trunk2_3/src/dlna/target/linux/bin/dms_smm/ffmpeg_libs/libavutil.so.51)
You can se that free mettod is system one
==18131== Address 0x4ccad00 is 16 bytes inside a block of size 41 alloc'd
==18131== at 0x402517B: memalign (vg_replace_malloc.c:581)
==18131== by 0x8054C00: alloc_ram (av_mem.c:382)
==18131== by 0x805545C: av_malloc (av_mem.c:699)
==18131== by 0x8055554: av_realloc (av_mem.c:740)
==18131== by 0x8054669: av_realloc_f (av_mem.c:186)
==18131== by 0x40AEAFC: dyn_buf_write (in
/media/truecrypt1/work/trunk2_3/src/dlna/target/linux/bin/dms_smm/ffmpeg_libs/libavformat.so.53)
but here function from libavformat realloc use memory handling from
av_mem.c (own memory implementation)
==18131==
==18131== Invalid free() / delete / delete[]
==18131== at 0x4025BF0: free (vg_replace_malloc.c:366)
==18131== by 0x48B6592: av_dict_free (in
/media/truecrypt1/work/trunk2_3/src/dlna/target/linux/bin/dms_smm/ffmpeg_libs/libavutil.so.51)
==18131== Address 0x4ccb3f0 is 16 bytes inside a block of size 48 alloc'd
==18131== at 0x402517B: memalign (vg_replace_malloc.c:581)
==18131== by 0x8054C00: alloc_ram (av_mem.c:382)
==18131== by 0x805545C: av_malloc (av_mem.c:699)
==18131== by 0x8055554: av_realloc (av_mem.c:740)
==18131== by 0x8054669: av_realloc_f (av_mem.c:186)
==18131== by 0x40AEAFC: dyn_buf_write (in
/media/truecrypt1/work/trunk2_3/src/dlna/target/linux/bin/dms_smm/ffmpeg_libs/libavformat.so.53)
next log:
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1108#comment:4>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list