Skip to content

memory leaks is detected at AcquireMagickMemory #1623

Closed
@SuhwanSong

Description

@SuhwanSong

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of ImageMagick
  • I have searched open and closed issues to ensure it has not already been reported

Description

There's memory leaks which are detected at AcquireMagickMemory.
This maybe relates with #1616.

Steps to Reproduce

run following cmd:
magick -seed 0 -label "%r%W&%tZRD%r%A" -units PixelsPerCentimeter -caption "%s%m%w" "(" magick:logo +repage ")" "(" magick:granite -shade 13x85 ")" -compress RLE -combine -ift -complex magnitude-phase tmp

Here's Asan Log.

==26664==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 13504 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121151bb54 in AcquireCriticalMemory ./MagickCore/memory-private.h:64:10
    #3 0x7f1211520109 in CloneImage MagickCore/image.c:823:25
    #4 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #5 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #6 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #7 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #8 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #9 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #10 0x526f95 in MagickMain utilities/magick.c:149:10
    #11 0x5268e1 in main utilities/magick.c:180:10
    #12 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 3686400 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f121156ea36 in AcquireAlignedMemory MagickCore/memory.c:265:7
    #2 0x7f12112b6ede in OpenPixelCache MagickCore/cache.c:3732:46
    #3 0x7f12112bd1c1 in GetImagePixelCache MagickCore/cache.c:1756:18
    #4 0x7f12112c35b9 in SyncImagePixelCache MagickCore/cache.c:5499:28
    #5 0x7f12115222c1 in SetImageStorageClass MagickCore/image.c:2627:10
    #6 0x7f12112ce980 in CombineImages MagickCore/channel.c:523:7
    #7 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #8 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #9 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #10 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #11 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #12 0x526f95 in MagickMain utilities/magick.c:149:10
    #13 0x5268e1 in main utilities/magick.c:180:10
    #14 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 22616 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121156ec7f in AcquireQuantumMemory MagickCore/memory.c:551:10
    #3 0x7f121152153d in CloneImage MagickCore/image.c:879:43
    #4 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #5 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #6 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #7 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #8 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #9 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #10 0x526f95 in MagickMain utilities/magick.c:149:10
    #11 0x5268e1 in main utilities/magick.c:180:10
    #12 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 13024 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121151bb54 in AcquireCriticalMemory ./MagickCore/memory-private.h:64:10
    #3 0x7f121151e193 in AcquireImageInfo MagickCore/image.c:350:28
    #4 0x7f1211526f53 in CloneImageInfo MagickCore/image.c:945:14
    #5 0x7f121151e0b8 in SyncImageSettings MagickCore/image.c:4242:21
    #6 0x7f12115358a6 in SyncImagesSettings MagickCore/image.c:4000:12
    #7 0x7f1210d081a3 in CLIOption MagickWand/operation.c:5249:14
    #8 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #9 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #10 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #11 0x526f95 in MagickMain utilities/magick.c:149:10
    #12 0x5268e1 in main utilities/magick.c:180:10
    #13 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 9152 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f121156ea36 in AcquireAlignedMemory MagickCore/memory.c:265:7
    #2 0x7f12112a11d4 in AcquirePixelCache MagickCore/cache.c:195:28
    #3 0x7f12112a275d in ClonePixelCache MagickCore/cache.c:515:28
    #4 0x7f12112bcf3b in GetImagePixelCache MagickCore/cache.c:1724:29
    #5 0x7f12112c35b9 in SyncImagePixelCache MagickCore/cache.c:5499:28
    #6 0x7f12115222c1 in SetImageStorageClass MagickCore/image.c:2627:10
    #7 0x7f12112ce980 in CombineImages MagickCore/channel.c:523:7
    #8 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #9 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121156ec7f in AcquireQuantumMemory MagickCore/memory.c:551:10
    #3 0x7f12115afa4a in AcquirePixelChannelMap MagickCore/pixel.c:101:35
    #4 0x7f12115afc24 in ClonePixelChannelMap MagickCore/pixel.c:139:13
    #5 0x7f1211520d8f in CloneImage MagickCore/image.c:849:28
    #6 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #7 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #8 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #9 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #10 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #11 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #12 0x526f95 in MagickMain utilities/magick.c:149:10
    #13 0x5268e1 in main utilities/magick.c:180:10
    #14 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 288 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121127eb74 in AcquireCriticalMemory ./MagickCore/memory-private.h:64:10
    #3 0x7f121128064d in CloneBlobInfo MagickCore/blob.c:554:27
    #4 0x7f1211521248 in CloneImage MagickCore/image.c:867:25
    #5 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #6 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #7 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #8 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #9 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #10 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #11 0x526f95 in MagickMain utilities/magick.c:149:10
    #12 0x5268e1 in main utilities/magick.c:180:10
    #13 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 192 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121156ec7f in AcquireQuantumMemory MagickCore/memory.c:551:10
    #3 0x7f12112a1daf in AcquirePixelCacheNexus MagickCore/cache.c:271:29
    #4 0x7f12112a175d in AcquirePixelCache MagickCore/cache.c:212:26
    #5 0x7f12112a275d in ClonePixelCache MagickCore/cache.c:515:28
    #6 0x7f12112bcf3b in GetImagePixelCache MagickCore/cache.c:1724:29
    #7 0x7f12112c35b9 in SyncImagePixelCache MagickCore/cache.c:5499:28
    #8 0x7f12115222c1 in SetImageStorageClass MagickCore/image.c:2627:10
    #9 0x7f12112ce980 in CombineImages MagickCore/channel.c:523:7
    #10 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #11 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #12 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #13 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #14 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #15 0x526f95 in MagickMain utilities/magick.c:149:10
    #16 0x5268e1 in main utilities/magick.c:180:10
    #17 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 128 byte(s) in 4 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f12116c9dd3 in AddValueToSplayTree MagickCore/splay-tree.c:189:21
    #3 0x7f12116cacdc in CloneSplayTree MagickCore/splay-tree.c:372:12
    #4 0x7f12115a03d0 in CloneImageOptions MagickCore/option.c:2144:27
    #5 0x7f1211528a58 in CloneImageInfo MagickCore/image.c:1010:10
    #6 0x7f121151e0b8 in SyncImageSettings MagickCore/image.c:4242:21
    #7 0x7f12115358a6 in SyncImagesSettings MagickCore/image.c:4000:12
    #8 0x7f1210d081a3 in CLIOption MagickWand/operation.c:5249:14
    #9 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #10 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #11 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #12 0x526f95 in MagickMain utilities/magick.c:149:10
    #13 0x5268e1 in main utilities/magick.c:180:10
    #14 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 128 byte(s) in 4 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f12116c9dd3 in AddValueToSplayTree MagickCore/splay-tree.c:189:21
    #3 0x7f12116cacdc in CloneSplayTree MagickCore/splay-tree.c:372:12
    #4 0x7f12115ff9f3 in CloneImageProperties MagickCore/property.c:196:25
    #5 0x7f1211520999 in CloneImage MagickCore/image.c:839:10
    #6 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #7 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #8 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #9 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #10 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #11 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #12 0x526f95 in MagickMain utilities/magick.c:149:10
    #13 0x5268e1 in main utilities/magick.c:180:10
    #14 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 115 byte(s) in 4 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121156ec7f in AcquireQuantumMemory MagickCore/memory.c:551:10
    #3 0x7f12117027c3 in ConstantString MagickCore/string.c:713:26
    #4 0x7f12116cacc6 in CloneSplayTree MagickCore/splay-tree.c:373:7
    #5 0x7f12115ff9f3 in CloneImageProperties MagickCore/property.c:196:25
    #6 0x7f1211520999 in CloneImage MagickCore/image.c:839:10
    #7 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #8 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #9 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f12116cee24 in AcquireCriticalMemory ./MagickCore/memory-private.h:64:10
    #3 0x7f12116caeb5 in NewSplayTree MagickCore/splay-tree.c:1148:32
    #4 0x7f12116caac4 in CloneSplayTree MagickCore/splay-tree.c:360:14
    #5 0x7f12115ff9f3 in CloneImageProperties MagickCore/property.c:196:25
    #6 0x7f1211520999 in CloneImage MagickCore/image.c:839:10
    #7 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #8 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #9 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f12116cee24 in AcquireCriticalMemory ./MagickCore/memory-private.h:64:10
    #3 0x7f12116caeb5 in NewSplayTree MagickCore/splay-tree.c:1148:32
    #4 0x7f12116caac4 in CloneSplayTree MagickCore/splay-tree.c:360:14
    #5 0x7f12115a03d0 in CloneImageOptions MagickCore/option.c:2144:27
    #6 0x7f1211528a58 in CloneImageInfo MagickCore/image.c:1010:10
    #7 0x7f121151e0b8 in SyncImageSettings MagickCore/image.c:4242:21
    #8 0x7f12115358a6 in SyncImagesSettings MagickCore/image.c:4000:12
    #9 0x7f1210d081a3 in CLIOption MagickWand/operation.c:5249:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f12116cee24 in AcquireCriticalMemory ./MagickCore/memory-private.h:64:10
    #3 0x7f12116caeb5 in NewSplayTree MagickCore/splay-tree.c:1148:32
    #4 0x7f12116caac4 in CloneSplayTree MagickCore/splay-tree.c:360:14
    #5 0x7f1211272c4a in CloneImageArtifacts MagickCore/artifact.c:118:24
    #6 0x7f12115209ac in CloneImage MagickCore/image.c:840:10
    #7 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #8 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #9 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f12116b4521 in AcquireSemaphoreMemory MagickCore/semaphore.c:154:7
    #2 0x7f12116b3d63 in AcquireSemaphoreInfo MagickCore/semaphore.c:200:36
    #3 0x7f12112a1ac4 in AcquirePixelCache MagickCore/cache.c:229:25
    #4 0x7f12112a275d in ClonePixelCache MagickCore/cache.c:515:28
    #5 0x7f12112bcf3b in GetImagePixelCache MagickCore/cache.c:1724:29
    #6 0x7f12112c35b9 in SyncImagePixelCache MagickCore/cache.c:5499:28
    #7 0x7f12115222c1 in SetImageStorageClass MagickCore/image.c:2627:10
    #8 0x7f12112ce980 in CombineImages MagickCore/channel.c:523:7
    #9 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #10 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #11 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #12 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #13 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #14 0x526f95 in MagickMain utilities/magick.c:149:10
    #15 0x5268e1 in main utilities/magick.c:180:10
    #16 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f121156ea36 in AcquireAlignedMemory MagickCore/memory.c:265:7
    #2 0x7f12112a1cb2 in AcquirePixelCacheNexus MagickCore/cache.c:267:29
    #3 0x7f12112a175d in AcquirePixelCache MagickCore/cache.c:212:26
    #4 0x7f12112a275d in ClonePixelCache MagickCore/cache.c:515:28
    #5 0x7f12112bcf3b in GetImagePixelCache MagickCore/cache.c:1724:29
    #6 0x7f12112c35b9 in SyncImagePixelCache MagickCore/cache.c:5499:28
    #7 0x7f12115222c1 in SetImageStorageClass MagickCore/image.c:2627:10
    #8 0x7f12112ce980 in CombineImages MagickCore/channel.c:523:7
    #9 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #10 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #11 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #12 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #13 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #14 0x526f95 in MagickMain utilities/magick.c:149:10
    #15 0x5268e1 in main utilities/magick.c:180:10
    #16 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f12116b4521 in AcquireSemaphoreMemory MagickCore/semaphore.c:154:7
    #2 0x7f12116b3d63 in AcquireSemaphoreInfo MagickCore/semaphore.c:200:36
    #3 0x7f12115213df in CloneImage MagickCore/image.c:871:26
    #4 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #5 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #6 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #7 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #8 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #9 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #10 0x526f95 in MagickMain utilities/magick.c:149:10
    #11 0x5268e1 in main utilities/magick.c:180:10
    #12 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f12116b4521 in AcquireSemaphoreMemory MagickCore/semaphore.c:154:7
    #2 0x7f12116b3d63 in AcquireSemaphoreInfo MagickCore/semaphore.c:200:36
    #3 0x7f1211280a9e in GetBlobInfo MagickCore/blob.c:1745:24
    #4 0x7f121128065a in CloneBlobInfo MagickCore/blob.c:555:3
    #5 0x7f1211521248 in CloneImage MagickCore/image.c:867:25
    #6 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #7 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #8 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #9 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #10 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #11 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #12 0x526f95 in MagickMain utilities/magick.c:149:10
    #13 0x5268e1 in main utilities/magick.c:180:10
    #14 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f12116b4521 in AcquireSemaphoreMemory MagickCore/semaphore.c:154:7
    #2 0x7f12116b3d63 in AcquireSemaphoreInfo MagickCore/semaphore.c:200:36
    #3 0x7f12116cb129 in NewSplayTree MagickCore/splay-tree.c:1159:25
    #4 0x7f12116caac4 in CloneSplayTree MagickCore/splay-tree.c:360:14
    #5 0x7f1211272c4a in CloneImageArtifacts MagickCore/artifact.c:118:24
    #6 0x7f12115209ac in CloneImage MagickCore/image.c:840:10
    #7 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #8 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #9 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f12116b4521 in AcquireSemaphoreMemory MagickCore/semaphore.c:154:7
    #2 0x7f12116b3d63 in AcquireSemaphoreInfo MagickCore/semaphore.c:200:36
    #3 0x7f12116cb129 in NewSplayTree MagickCore/splay-tree.c:1159:25
    #4 0x7f12116caac4 in CloneSplayTree MagickCore/splay-tree.c:360:14
    #5 0x7f12115ff9f3 in CloneImageProperties MagickCore/property.c:196:25
    #6 0x7f1211520999 in CloneImage MagickCore/image.c:839:10
    #7 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #8 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #9 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f12116b4521 in AcquireSemaphoreMemory MagickCore/semaphore.c:154:7
    #2 0x7f12116b3d63 in AcquireSemaphoreInfo MagickCore/semaphore.c:200:36
    #3 0x7f12116cb129 in NewSplayTree MagickCore/splay-tree.c:1159:25
    #4 0x7f12116caac4 in CloneSplayTree MagickCore/splay-tree.c:360:14
    #5 0x7f12115a03d0 in CloneImageOptions MagickCore/option.c:2144:27
    #6 0x7f1211528a58 in CloneImageInfo MagickCore/image.c:1010:10
    #7 0x7f121151e0b8 in SyncImageSettings MagickCore/image.c:4242:21
    #8 0x7f12115358a6 in SyncImagesSettings MagickCore/image.c:4000:12
    #9 0x7f1210d081a3 in CLIOption MagickWand/operation.c:5249:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x4e6200 in posix_memalign (install/bin/magick+0x4e6200)
    #1 0x7f12116b4521 in AcquireSemaphoreMemory MagickCore/semaphore.c:154:7
    #2 0x7f12116b3d63 in AcquireSemaphoreInfo MagickCore/semaphore.c:200:36
    #3 0x7f12112a1b53 in AcquirePixelCache MagickCore/cache.c:231:30
    #4 0x7f12112a275d in ClonePixelCache MagickCore/cache.c:515:28
    #5 0x7f12112bcf3b in GetImagePixelCache MagickCore/cache.c:1724:29
    #6 0x7f12112c35b9 in SyncImagePixelCache MagickCore/cache.c:5499:28
    #7 0x7f12115222c1 in SetImageStorageClass MagickCore/image.c:2627:10
    #8 0x7f12112ce980 in CombineImages MagickCore/channel.c:523:7
    #9 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #10 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #11 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #12 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #13 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #14 0x526f95 in MagickMain utilities/magick.c:149:10
    #15 0x5268e1 in main utilities/magick.c:180:10
    #16 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 46 byte(s) in 4 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121156ec7f in AcquireQuantumMemory MagickCore/memory.c:551:10
    #3 0x7f12117027c3 in ConstantString MagickCore/string.c:713:26
    #4 0x7f12116cacc6 in CloneSplayTree MagickCore/splay-tree.c:373:7
    #5 0x7f12115a03d0 in CloneImageOptions MagickCore/option.c:2144:27
    #6 0x7f1211528a58 in CloneImageInfo MagickCore/image.c:1010:10
    #7 0x7f121151e0b8 in SyncImageSettings MagickCore/image.c:4242:21
    #8 0x7f12115358a6 in SyncImagesSettings MagickCore/image.c:4000:12
    #9 0x7f1210d081a3 in CLIOption MagickWand/operation.c:5249:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 38 byte(s) in 4 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121156ec7f in AcquireQuantumMemory MagickCore/memory.c:551:10
    #3 0x7f12117027c3 in ConstantString MagickCore/string.c:713:26
    #4 0x7f12116cac41 in CloneSplayTree MagickCore/splay-tree.c:372:43
    #5 0x7f12115ff9f3 in CloneImageProperties MagickCore/property.c:196:25
    #6 0x7f1211520999 in CloneImage MagickCore/image.c:839:10
    #7 0x7f12112ce94b in CombineImages MagickCore/channel.c:520:17
    #8 0x7f1210cfc574 in CLIListOperatorImages MagickWand/operation.c:3848:22
    #9 0x7f1210d0839e in CLIOption MagickWand/operation.c:5282:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

Indirect leak of 29 byte(s) in 4 object(s) allocated from:
    #0 0x4e5397 in malloc (install/bin/magick+0x4e5397)
    #1 0x7f121156ec16 in AcquireMagickMemory MagickCore/memory.c:478:10
    #2 0x7f121156ec7f in AcquireQuantumMemory MagickCore/memory.c:551:10
    #3 0x7f12117027c3 in ConstantString MagickCore/string.c:713:26
    #4 0x7f12116cac41 in CloneSplayTree MagickCore/splay-tree.c:372:43
    #5 0x7f12115a03d0 in CloneImageOptions MagickCore/option.c:2144:27
    #6 0x7f1211528a58 in CloneImageInfo MagickCore/image.c:1010:10
    #7 0x7f121151e0b8 in SyncImageSettings MagickCore/image.c:4242:21
    #8 0x7f12115358a6 in SyncImagesSettings MagickCore/image.c:4000:12
    #9 0x7f1210d081a3 in CLIOption MagickWand/operation.c:5249:14
    #10 0x7f1210b49a99 in ProcessCommandOptions MagickWand/magick-cli.c:477:7
    #11 0x7f1210b4ad0a in MagickImageCommand MagickWand/magick-cli.c:796:5
    #12 0x7f1210b94ba1 in MagickCommandGenesis MagickWand/mogrify.c:185:14
    #13 0x526f95 in MagickMain utilities/magick.c:149:10
    #14 0x5268e1 in main utilities/magick.c:180:10
    #15 0x7f120b60bb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310

SUMMARY: AddressSanitizer: 3746948 byte(s) leaked in 43 allocation(s).

System Configuration

  • ImageMagick version:
    ImageMagick 7.0.8-52 Q16 x86_64 2019-07-02 https://imagemagick.org

  • Environment (Operating system, version and so on):
    Description: Ubuntu 18.04.1 LTS
    Release: 18.04
    Codename: bionic

  • Additional information:
    CC=clang-7 CXX=clang++-7 ./configure --disable-openmp --without-png
    and I also tested on Ubuntu 16.04 with clang-3.8 and gcc-5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions