$ valgrind ./gsc2 --show player.sprite ==24525== Memcheck, a memory error detector. ==24525== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==24525== Using LibVEX rev 1804, a library for dynamic binary translation. ==24525== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==24525== Using valgrind-3.3.0-Debian, a dynamic binary instrumentation framework. ==24525== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==24525== For more details, rerun with: -v ==24525== Loading... Parsing... Syntax OK. ==24525== Invalid read of size 8 ==24525== at 0x4015EB0: (within /lib/ld-2.7.so) ==24525== by 0x400AB93: (within /lib/ld-2.7.so) ==24525== by 0x40061E4: (within /lib/ld-2.7.so) ==24525== by 0x4008677: (within /lib/ld-2.7.so) ==24525== by 0x4012048: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x401191A: (within /lib/ld-2.7.so) ==24525== by 0x5ECDF8A: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECDEF0: dlopen (in /lib/libdl-2.7.so) ==24525== by 0x4ECF03E: _unix_load_modules (in /usr/lib/liballeg.so.4.2) ==24525== Address 0x7c46208 is 32 bytes inside a block of size 38 alloc'd ==24525== at 0x4C22FAB: malloc (vg_replace_malloc.c:207) ==24525== by 0x4007823: (within /lib/ld-2.7.so) ==24525== by 0x40085CE: (within /lib/ld-2.7.so) ==24525== by 0x4012048: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x401191A: (within /lib/ld-2.7.so) ==24525== by 0x5ECDF8A: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECDEF0: dlopen (in /lib/libdl-2.7.so) ==24525== by 0x4ECF03E: _unix_load_modules (in /usr/lib/liballeg.so.4.2) ==24525== by 0x4F14ED5: (within /usr/lib/liballeg.so.4.2) ==24525== ==24525== Invalid read of size 8 ==24525== at 0x4015EFE: (within /lib/ld-2.7.so) ==24525== by 0x400AB93: (within /lib/ld-2.7.so) ==24525== by 0x40061E4: (within /lib/ld-2.7.so) ==24525== by 0x4008677: (within /lib/ld-2.7.so) ==24525== by 0x400BE0C: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x400C4D0: (within /lib/ld-2.7.so) ==24525== by 0x40120A8: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x401191A: (within /lib/ld-2.7.so) ==24525== by 0x5ECDF8A: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== Address 0x7c47ec8 is 24 bytes inside a block of size 26 alloc'd ==24525== at 0x4C22FAB: malloc (vg_replace_malloc.c:207) ==24525== by 0x4008B75: (within /lib/ld-2.7.so) ==24525== by 0x400BE0C: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x400C4D0: (within /lib/ld-2.7.so) ==24525== by 0x40120A8: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x401191A: (within /lib/ld-2.7.so) ==24525== by 0x5ECDF8A: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECDEF0: dlopen (in /lib/libdl-2.7.so) ==24525== ==24525== Invalid read of size 8 ==24525== at 0x4015ECA: (within /lib/ld-2.7.so) ==24525== by 0x400AB93: (within /lib/ld-2.7.so) ==24525== by 0x40061E4: (within /lib/ld-2.7.so) ==24525== by 0x4008677: (within /lib/ld-2.7.so) ==24525== by 0x4012048: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x401191A: (within /lib/ld-2.7.so) ==24525== by 0x5ECDF8A: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECDEF0: dlopen (in /lib/libdl-2.7.so) ==24525== by 0x4ECF03E: _unix_load_modules (in /usr/lib/liballeg.so.4.2) ==24525== Address 0x7c4a938 is 40 bytes inside a block of size 41 alloc'd ==24525== at 0x4C22FAB: malloc (vg_replace_malloc.c:207) ==24525== by 0x4007823: (within /lib/ld-2.7.so) ==24525== by 0x40085CE: (within /lib/ld-2.7.so) ==24525== by 0x4012048: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x401191A: (within /lib/ld-2.7.so) ==24525== by 0x5ECDF8A: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECDEF0: dlopen (in /lib/libdl-2.7.so) ==24525== by 0x4ECF03E: _unix_load_modules (in /usr/lib/liballeg.so.4.2) ==24525== by 0x4F14ED5: (within /usr/lib/liballeg.so.4.2) ==24525== ==24525== Invalid read of size 8 ==24525== at 0x4015ECA: (within /lib/ld-2.7.so) ==24525== by 0x400DEE6: (within /lib/ld-2.7.so) ==24525== by 0x400E093: (within /lib/ld-2.7.so) ==24525== by 0x400A547: (within /lib/ld-2.7.so) ==24525== by 0x6B9E303: (within /lib/libc-2.7.so) ==24525== by 0x5ECE0F3: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECE0A9: dlsym (in /lib/libdl-2.7.so) ==24525== by 0x4ECEDB4: _unix_unload_modules (in /usr/lib/liballeg.so.4.2) ==24525== by 0x4F14D24: (within /usr/lib/liballeg.so.4.2) ==24525== by 0x4E514CA: allegro_exit (in /usr/lib/liballeg.so.4.2) ==24525== Address 0x7c4c1a8 is 40 bytes inside a block of size 41 alloc'd ==24525== at 0x4C22FAB: malloc (vg_replace_malloc.c:207) ==24525== by 0x4007823: (within /lib/ld-2.7.so) ==24525== by 0x40085CE: (within /lib/ld-2.7.so) ==24525== by 0x4012048: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x401191A: (within /lib/ld-2.7.so) ==24525== by 0x5ECDF8A: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECDEF0: dlopen (in /lib/libdl-2.7.so) ==24525== by 0x4ECF03E: _unix_load_modules (in /usr/lib/liballeg.so.4.2) ==24525== by 0x4F14ED5: (within /usr/lib/liballeg.so.4.2) ==24525== ==24525== Invalid read of size 8 ==24525== at 0x4015EB0: (within /lib/ld-2.7.so) ==24525== by 0x400DEE6: (within /lib/ld-2.7.so) ==24525== by 0x400E093: (within /lib/ld-2.7.so) ==24525== by 0x400A547: (within /lib/ld-2.7.so) ==24525== by 0x6B9E303: (within /lib/libc-2.7.so) ==24525== by 0x5ECE0F3: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECE0A9: dlsym (in /lib/libdl-2.7.so) ==24525== by 0x4ECEDB4: _unix_unload_modules (in /usr/lib/liballeg.so.4.2) ==24525== by 0x4F14D24: (within /usr/lib/liballeg.so.4.2) ==24525== by 0x4E514CA: allegro_exit (in /usr/lib/liballeg.so.4.2) ==24525== Address 0x7c47950 is 32 bytes inside a block of size 37 alloc'd ==24525== at 0x4C22FAB: malloc (vg_replace_malloc.c:207) ==24525== by 0x4007823: (within /lib/ld-2.7.so) ==24525== by 0x40085CE: (within /lib/ld-2.7.so) ==24525== by 0x4012048: (within /lib/ld-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x401191A: (within /lib/ld-2.7.so) ==24525== by 0x5ECDF8A: (within /lib/libdl-2.7.so) ==24525== by 0x400DDF5: (within /lib/ld-2.7.so) ==24525== by 0x5ECE4EC: (within /lib/libdl-2.7.so) ==24525== by 0x5ECDEF0: dlopen (in /lib/libdl-2.7.so) ==24525== by 0x4ECF03E: _unix_load_modules (in /usr/lib/liballeg.so.4.2) ==24525== by 0x4F14ED5: (within /usr/lib/liballeg.so.4.2) ==24525== ==24525== Invalid read of size 8 ==24525== at 0x4E8A2F8: destroy_bitmap (in /usr/lib/liballeg.so.4.2) ==24525== by 0x40C10F: ENGINE::ImageResource::Destroy() (ImageResource.cpp:184) ==24525== by 0x40C1AC: ENGINE::ImageResource::~ImageResource() (ImageResource.cpp:77) ==24525== by 0x403472: GSCShow::~GSCShow() (main.cpp:280) ==24525== by 0x403529: __tcf_0 (main.cpp:66) ==24525== by 0x6AC510F: exit (in /lib/libc-2.7.so) ==24525== by 0x6AAE1CA: (below main) (in /lib/libc-2.7.so) ==24525== Address 0x90 is not stack'd, malloc'd or (recently) free'd ==24525== ==24525== Process terminating with default action of signal 11 (SIGSEGV) ==24525== Access not within mapped region at address 0x90 ==24525== at 0x4E8A2F8: destroy_bitmap (in /usr/lib/liballeg.so.4.2) ==24525== by 0x40C10F: ENGINE::ImageResource::Destroy() (ImageResource.cpp:184) ==24525== by 0x40C1AC: ENGINE::ImageResource::~ImageResource() (ImageResource.cpp:77) ==24525== by 0x403472: GSCShow::~GSCShow() (main.cpp:280) ==24525== by 0x403529: __tcf_0 (main.cpp:66) ==24525== by 0x6AC510F: exit (in /lib/libc-2.7.so) ==24525== by 0x6AAE1CA: (below main) (in /lib/libc-2.7.so) ==24525== ==24525== ERROR SUMMARY: 14 errors from 6 contexts (suppressed: 58 from 1) ==24525== malloc/free: in use at exit: 2,334,478 bytes in 865 blocks. ==24525== malloc/free: 8,038 allocs, 7,173 frees, 5,422,702 bytes allocated. ==24525== For counts of detected errors, rerun with: -v ==24525== searching for pointers to 865 not-freed blocks. ==24525== checked 2,869,096 bytes. ==24525== ==24525== LEAK SUMMARY: ==24525== definitely lost: 0 bytes in 0 blocks. ==24525== possibly lost: 424 bytes in 11 blocks. ==24525== still reachable: 2,334,054 bytes in 854 blocks. ==24525== suppressed: 0 bytes in 0 blocks. ==24525== Rerun with --leak-check=full to see details of leaked memory.