Memory leak in API

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Locked
fumfel
Posts: 12
Joined: 2016-09-20T06:30:11-07:00
Authentication code: 1151

Memory leak in API

Post 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).
Regards,
Kamil Frankowicz

User avatar
magick
Site Admin
Posts: 11254
Joined: 2003-05-31T11:32:55-07:00

Re: Memory leak in API

Post 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.

Locked