strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.76k stars 302 forks source link

memory leak in de265_init() #531

Closed liuchang3 closed 10 months ago

liuchang3 commented 3 years ago

libheif version: 1.10.0

==25882== 11,296 bytes in 1 blocks are still reachable in loss record 7 of 7 ==25882== at 0x4C30FB5: malloc (vg_replace_malloc.c:380) ==25882== by 0x53B7637: alloc_and_init_significant_coeff_ctxIdx_lookupTable() (in /home/ADC/80301694/Work/2021-06-24-Base/TBLMultiMediaCloud/tbl_image/out/lib/Tbl_Image_Kit/lib/libtbl_image_kit.so.1.0.8) ==25882== by 0x539F229: de265_init (in /home/ADC/80301694/Work/2021-06-24-Base/TBLMultiMediaCloud/tbl_image/out/lib/Tbl_Image_Kit/lib/libtbl_image_kit.so.1.0.8) ==25882== by 0x5363B41: heif::register_decoder(heif_decoder_plugin const*) (in /home/ADC/80301694/Work/2021-06-24-Base/TBLMultiMediaCloud/tbl_image/out/lib/Tbl_Image_Kit/lib/libtbl_image_kit.so.1.0.8) ==25882== by 0x4F4AD38: _GLOBAL__sub_I_heif_plugin_registry.cc (in /home/ADC/80301694/Work/2021-06-24-Base/TBLMultiMediaCloud/tbl_image/out/lib/Tbl_Image_Kit/lib/libtbl_image_kit.so.1.0.8) ==25882== by 0x4010732: call_init (dl-init.c:72) ==25882== by 0x4010732: _dl_init (dl-init.c:119) ==25882== by 0x40010C9: ??? (in /lib/x86_64-linux-gnu/ld-2.27.so) ==25882== by 0x1: ??? ==25882== by 0x1FFF00004A: ??? ==25882== by 0x1FFF000060: ???

i check the code, there is de265_free function but not be called, looks like missing call deinit_plugin the issue is found by imagemagick test .

bradh commented 11 months ago

I cannot reproduce this problem. Can you show the repro? Exact configuration, exact usage, please.

bradh commented 10 months ago

It looks like this was fixed by #654 and can be closed.