memory leak

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
rpatelob
Posts: 62
Joined: 2017-04-17T22:17:01-07:00
Authentication code: 1151

memory leak

Post by rpatelob »

Code: Select all

Version: ImageMagick 7.0.6-0 Q16 x86_64 2017-06-14 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP 
Delegates (built-in): bzlib djvu fontconfig freetype gvc jbig jng jpeg lcms lqr lzma openexr png tiff wmf x xml zlib

I'm using valgrind to check for memory leak and it shows so many errors, I don't know may be I made any mistake or not.
This is the C code.

Code: Select all

#include <stdlib.h>
#include <MagickWand/MagickWand.h>

int main() {
  MagickWand *magick_wand;
  unsigned char blob[921615];

  fread(blob,921615,1,stdin);
  MagickWandGenesis();
  magick_wand=NewMagickWand();
  MagickReadImageBlob(magick_wand,blob,921615);
  MagickWriteImage(magick_wand,"logo.miff");
  DestroyMagickWand(magick_wand);
  MagickWandTerminus();
}
The last line from valgrind is

Code: Select all

ERROR SUMMARY: 82 errors from 82 contexts (suppressed: 0 from 0)
Below is the CLI I used to check

Code: Select all

valgrind --leak-check=yes -v cc -o wand test.c `pkg-config --cflags --libs MagickWand
Valgrind version in my system valgrind-3.11.0
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: memory leak

Post by magick »

We do not get any errors or leaks:

Code: Select all

-> valgrind --leak-check=yes wand < logo.png
...
==9056== LEAK SUMMARY:
==9056==    definitely lost: 0 bytes in 0 blocks
==9056==    indirectly lost: 0 bytes in 0 blocks
...
==9056== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
rpatelob
Posts: 62
Joined: 2017-04-17T22:17:01-07:00
Authentication code: 1151

Re: memory leak

Post by rpatelob »

Thanks @magick,

In my system it shows error, is it because of IM version?
It sows weird error. I couldn't able to understood it. Please look at the below output of valgrind.

Code: Select all

==5701== Memcheck, a memory error detector
==5701== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==5701== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==5701== Command: cc -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/include/ImageMagick-7 -o wand test.c -L/usr/local/lib -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI -L/usr/local/lib -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI
==5701== 
==5701== 
==5701== HEAP SUMMARY:
==5701==     in use at exit: 155,004 bytes in 227 blocks
==5701==   total heap usage: 403 allocs, 176 frees, 182,386 bytes allocated
==5701== 
==5701== 3 bytes in 1 blocks are definitely lost in loss record 4 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 4 bytes in 1 blocks are definitely lost in loss record 5 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F6E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 4 bytes in 1 blocks are definitely lost in loss record 6 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F6E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 5 bytes in 1 blocks are definitely lost in loss record 8 of 151
==5701==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F4A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x444DBD: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5A5: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 6 bytes in 1 blocks are definitely lost in loss record 11 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443B5F: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BE9E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 9 bytes in 1 blocks are definitely lost in loss record 13 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x442053: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 10 bytes in 1 blocks are definitely lost in loss record 15 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x440984: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BCA3: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 10 bytes in 1 blocks are definitely lost in loss record 16 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443B5F: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BEAD: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 11 bytes in 1 blocks are definitely lost in loss record 17 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x440075: ??? (in /usr/bin/gcc-5)
==5701==    by 0x40A7A4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E56: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 11 bytes in 1 blocks are definitely lost in loss record 18 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44213D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 12 bytes in 1 blocks are definitely lost in loss record 19 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 13 bytes in 1 blocks are definitely lost in loss record 20 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441A4B: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 15 bytes in 1 blocks are definitely lost in loss record 26 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x440984: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4408D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BC88: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 16 bytes in 1 blocks are definitely lost in loss record 31 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x464A9B: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44693D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x442391: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 16 bytes in 1 blocks are definitely lost in loss record 32 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4469AC: ??? (in /usr/bin/gcc-5)
==5701==    by 0x442391: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 37 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x456400: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B581: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 38 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F8AE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4419CD: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 39 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F8AE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441A24: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 40 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44774E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441376: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 41 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44774E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x445F15: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5B5: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 42 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446C04: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 43 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446D6D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 44 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4455C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446B46: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 45 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4455C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446B67: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 46 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F8AE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44202A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 47 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x40A790: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E56: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 48 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421EB: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44213D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 49 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421EB: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 18 bytes in 1 blocks are definitely lost in loss record 50 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44774E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446B88: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 23 bytes in 2 blocks are definitely lost in loss record 52 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441E99: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 24 bytes in 1 blocks are definitely lost in loss record 54 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x440215: ??? (in /usr/bin/gcc-5)
==5701==    by 0x40A7A4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E56: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 25 bytes in 1 blocks are definitely lost in loss record 55 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441A6B: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 34 bytes in 2 blocks are possibly lost in loss record 68 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43E66E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x459046: ??? (in /usr/bin/gcc-5)
==5701==    by 0x458F3B: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43DC17: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BB2C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 41 bytes in 1 blocks are definitely lost in loss record 74 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 41 bytes in 1 blocks are definitely lost in loss record 75 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 41 bytes in 2 blocks are definitely lost in loss record 76 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x440984: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4408D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BC88: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 42 bytes in 1 blocks are definitely lost in loss record 78 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BE72: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 54 bytes in 3 blocks are definitely lost in loss record 79 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F2D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421EB: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x442053: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 61 bytes in 2 blocks are definitely lost in loss record 80 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F6E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 61 bytes in 2 blocks are definitely lost in loss record 81 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F6E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 62 bytes in 2 blocks are definitely lost in loss record 82 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x442053: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 64 bytes in 2 blocks are definitely lost in loss record 84 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x440984: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4408D2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BC88: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 66 bytes in 1 blocks are definitely lost in loss record 87 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43DF54: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BB2C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 66 bytes in 1 blocks are definitely lost in loss record 88 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43DF87: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43BB2C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B56A: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 82 bytes in 2 blocks are definitely lost in loss record 89 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 93 bytes in 1 blocks are definitely lost in loss record 93 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F385: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446C04: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 97 bytes in 1 blocks are definitely lost in loss record 95 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43F385: ??? (in /usr/bin/gcc-5)
==5701==    by 0x40A790: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E56: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 98 (16 direct, 82 indirect) bytes in 1 blocks are definitely lost in loss record 96 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446979: ??? (in /usr/bin/gcc-5)
==5701==    by 0x442391: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 100 bytes in 1 blocks are definitely lost in loss record 97 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 100 bytes in 1 blocks are definitely lost in loss record 98 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F6E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 100 bytes in 1 blocks are definitely lost in loss record 99 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 100 bytes in 1 blocks are definitely lost in loss record 100 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 100 bytes in 1 blocks are definitely lost in loss record 101 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F6E: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 100 bytes in 1 blocks are definitely lost in loss record 102 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 103 bytes in 4 blocks are definitely lost in loss record 104 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 111 bytes in 1 blocks are definitely lost in loss record 105 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44215D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 114 bytes in 2 blocks are definitely lost in loss record 106 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446647: ??? (in /usr/bin/gcc-5)
==5701==    by 0x445F15: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 118 bytes in 1 blocks are definitely lost in loss record 107 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 118 bytes in 1 blocks are definitely lost in loss record 108 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E27: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 118 bytes in 1 blocks are definitely lost in loss record 109 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 118 bytes in 1 blocks are definitely lost in loss record 110 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441F3C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 156 bytes in 3 blocks are definitely lost in loss record 112 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 168 bytes in 2 blocks are definitely lost in loss record 113 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x442053: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 170 bytes in 1 blocks are definitely lost in loss record 114 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43FD37: ??? (in /usr/bin/gcc-5)
==5701==    by 0x40A7A4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E56: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 200 bytes in 1 blocks are definitely lost in loss record 115 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x46397C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x448033: ??? (in /usr/bin/gcc-5)
==5701==    by 0x447E56: ??? (in /usr/bin/gcc-5)
==5701==    by 0x441FCE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 244 bytes in 5 blocks are definitely lost in loss record 116 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 303 bytes in 1 blocks are definitely lost in loss record 118 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44213D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 335 bytes in 1 blocks are definitely lost in loss record 119 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x442053: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 410 bytes in 1 blocks are definitely lost in loss record 121 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44215D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 462 bytes in 2 blocks are definitely lost in loss record 123 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44215D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 468 bytes in 1 blocks are definitely lost in loss record 124 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446647: ??? (in /usr/bin/gcc-5)
==5701==    by 0x445F15: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5B5: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 475 bytes in 1 blocks are definitely lost in loss record 125 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446647: ??? (in /usr/bin/gcc-5)
==5701==    by 0x445F15: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5B5: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 481 bytes in 1 blocks are definitely lost in loss record 126 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446647: ??? (in /usr/bin/gcc-5)
==5701==    by 0x445F15: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5B5: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 541 bytes in 13 blocks are definitely lost in loss record 128 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4421C0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 657 bytes in 3 blocks are definitely lost in loss record 130 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44215D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 1,600 bytes in 1 blocks are definitely lost in loss record 135 of 151
==5701==    at 0x4C2FD5F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455FB2: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4585E8: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B552: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 3,070 bytes in 1 blocks are definitely lost in loss record 136 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446647: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446B88: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 3,077 bytes in 1 blocks are definitely lost in loss record 137 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446647: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446B88: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== 3,083 bytes in 1 blocks are definitely lost in loss record 138 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446647: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446B88: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 3,089 bytes in 1 blocks are definitely lost in loss record 139 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446647: ??? (in /usr/bin/gcc-5)
==5701==    by 0x446B88: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5C4: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 4,064 bytes in 1 blocks are definitely lost in loss record 148 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4EC260D: _obstack_begin (obstack.c:176)
==5701==    by 0x4562FE: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B579: ??? (in /usr/bin/gcc-5)
==5701==    by 0x43B5F0: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4E5A82F: (below main) (libc-start.c:291)
==5701== 
==5701== 10,750 bytes in 26 blocks are definitely lost in loss record 150 of 151
==5701==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==5701==    by 0x455F0D: ??? (in /usr/bin/gcc-5)
==5701==    by 0x443061: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701==    by 0x44308C: ??? (in /usr/bin/gcc-5)
==5701==    by 0x4412A7: ??? (in /usr/bin/gcc-5)
==5701== 
==5701== LEAK SUMMARY:
==5701==    definitely lost: 36,559 bytes in 141 blocks
==5701==    indirectly lost: 82 bytes in 5 blocks
==5701==      possibly lost: 34 bytes in 2 blocks
==5701==    still reachable: 118,329 bytes in 79 blocks
==5701==         suppressed: 0 bytes in 0 blocks
==5701== Reachable blocks (those to which a pointer was found) are not shown.
==5701== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==5701== 
==5701== For counts of detected and suppressed errors, rerun with: -v
==5701== ERROR SUMMARY: 82 errors from 82 contexts (suppressed: 0 from 0)
I have installed ImageMagick from source and follows https://www.imagemagick.org/script/install-source.php link.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: memory leak

Post by magick »

You are checking for memory leaks in the compiler, not ImageMagick. Try this command instead:

Code: Select all

valgrind --leak-check=yes wand < logo.png
rpatelob
Posts: 62
Joined: 2017-04-17T22:17:01-07:00
Authentication code: 1151

Re: memory leak

Post by rpatelob »

Oh thanks!

Code: Select all

int main(int argc, char const *argv[]) {
  MagickWand * wand0;

  MagickWandGenesis();

  wand0 = NewMagickWand();
  MagickReadImage(wand0, "logo:");

  MagickTransformImageColorspace(wand0, GRAYColorspace);

  MagickShadeImage(wand0, MagickTrue, 125.0, 130.0);


  MagickWriteImage(wand0, "output.gif");

  wand0 = DestroyMagickWand(wand0);

  MagickWandTerminus();

  return 0;
}
Now with this code it's showing error on two places MagickTransformImageColorspace and MagickShadeImage.

Code: Select all

 HEAP SUMMARY:
==4237==     in use at exit: 94,724 bytes in 20 blocks
==4237==   total heap usage: 8,079 allocs, 8,059 frees, 166,805,861 bytes allocated
==4237== 
==4237== 320 bytes in 1 blocks are possibly lost in loss record 14 of 19
==4237==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4237==    by 0x40136D4: allocate_dtv (dl-tls.c:322)
==4237==    by 0x40136D4: _dl_allocate_tls (dl-tls.c:539)
==4237==    by 0x548426E: allocate_stack (allocatestack.c:588)
==4237==    by 0x548426E: pthread_create@@GLIBC_2.2.5 (pthread_create.c:539)
==4237==    by 0x648B99F: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==4237==    by 0x6487CB9: GOMP_parallel (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==4237==    by 0x5B025E7: sRGBTransformImage (colorspace.c:343)
==4237==    by 0x5B03BB2: TransformImageColorspace (colorspace.c:1301)
==4237==    by 0x401190: main (in /home/software/Desktop/ImageMagick-source/MagickWand/emboss/wand)
==4237== 
==4237== 640 bytes in 2 blocks are possibly lost in loss record 15 of 19
==4237==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4237==    by 0x40136D4: allocate_dtv (dl-tls.c:322)
==4237==    by 0x40136D4: _dl_allocate_tls (dl-tls.c:539)
==4237==    by 0x548426E: allocate_stack (allocatestack.c:588)
==4237==    by 0x548426E: pthread_create@@GLIBC_2.2.5 (pthread_create.c:539)
==4237==    by 0x648B99F: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==4237==    by 0x6487CB9: GOMP_parallel (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==4237==    by 0x5B9E8FF: SyncImage (image.c:3728)
==4237==    by 0x5B0323A: sRGBTransformImage (colorspace.c:336)
==4237==    by 0x5B03BB2: TransformImageColorspace (colorspace.c:1301)
==4237==    by 0x401190: main (in /home/software/Desktop/ImageMagick-source/MagickWand/emboss/wand)
==4237== 
==4237== LEAK SUMMARY:
==4237==    definitely lost: 0 bytes in 0 blocks
==4237==    indirectly lost: 0 bytes in 0 blocks
==4237==      possibly lost: 960 bytes in 3 blocks
==4237==    still reachable: 93,764 bytes in 17 blocks
==4237==         suppressed: 0 bytes in 0 blocks
==4237== Reachable blocks (those to which a pointer was found) are not shown.
==4237== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==4237== 
==4237== For counts of detected and suppressed errors, rerun with: -v
==4237== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: memory leak

Post by magick »

You are seeing overhead associated with setting up the OpenMP parallel environment. We can't control that, its part of the libgomp library, not ImageMagick. Or perhaps libgomp has a destructor we can call, but we are not aware of an destructor API call. You can build ImageMagick without OpenMP enabled, just add --disable-openmp to your configure script command-line, build, and reinstall.
rpatelob
Posts: 62
Joined: 2017-04-17T22:17:01-07:00
Authentication code: 1151

Re: memory leak

Post by rpatelob »

magick wrote: 2017-06-20T11:58:40-07:00 You are seeing overhead associated with setting up the OpenMP parallel environment. We can't control that, its part of the libgomp library, not ImageMagick. Or perhaps libgomp has a destructor we can call, but we are not aware of an destructor API call. You can build ImageMagick without OpenMP enabled, just add --disable-openmp to your configure script command-line, build, and reinstall.

Actually I want OpenMP in my production, how do we avoid such leaks? Does OpenMP version creates leak?
and Is it good to ignore such errors in production? Any suggestions please!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: memory leak

Post by magick »

Post Reply