Page 1 of 1

Memory leak in API

Posted: 2016-09-20T08:55:41-07:00
by fumfel
IM Version (compiled from source):

Code: Select all

Version: ImageMagick 7.0.3-0 Q16 x86_64 2016-09-14 http://www.imagemagick.org
Source file

To reproduce:

Code: Select all

convert crash.dib a.jpg
LeakSanitizer output:

Code: Select all

==535==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4160 byte(s) in 1 object(s) allocated from:
    #0 0x7fc8b750c076 in __interceptor_posix_memalign (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99076)
    #1 0x7fc8b686b28c in AcquireAlignedMemory MagickCore/memory.c:258

Indirect leak of 5811648 byte(s) in 1 object(s) allocated from:
    #0 0x7fc8b750c076 in __interceptor_posix_memalign (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x99076)
    #1 0x7fc8b686b28c in AcquireAlignedMemory MagickCore/memory.c:258

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

Re: Memory leak in API

Posted: 2016-09-20T09:08:23-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.