I have several libs that I am testing with boost unit test Valgrind shows mismatched free/delete Using opensuse113, gcc 4.5, boost 1.47 I am bit perplexed because: a/ The valgrind errors only show up with release mode. b/ The valgrind errors suggest problems with unit test, but I have dozen or so separate unit tests, however, errors only shows up on one of the tests. has anyone come across these errors, and suggestion of how to overcome. + valgrind --leak-check=full --show-reachable=yes ACore/bin/gcc-4.5/release/coretest ==25529== Memcheck, a memory error detector ==25529== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==25529== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==25529== Command: ACore/bin/gcc-4.5/release/coretest ==25529== ==25529== Mismatched free() / delete / delete [] ==25529== at 0x4C25F7B: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==25529== by 0x4D25CA: _ZNSt6vectorISt4pairIN5boost9unit_test13basic_cstringIKcEES5_ESaIS6_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS6_S8_EERKS6_.clone.57 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4D3B09: _Z41__static_initialization_and_destruction_0ii.clone.0 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x50EEF5: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4265AA: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x511D22F: ??? (in /usr/lib64/libstdc++.so.6.0.14) ==25529== by 0x50EE74: __libc_csu_init (elf-init.c:120) ==25529== by 0x55C1B0F: (below main) (in /lib64/libc-2.11.2.so) ==25529== Address 0x5904c60 is 0 bytes inside a block of size 32 alloc'd ==25529== at 0x4C267D0: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==25529== by 0x4D2561: _ZNSt6vectorISt4pairIN5boost9unit_test13basic_cstringIKcEES5_ESaIS6_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS6_S8_EERKS6_.clone.57 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4D2F62: _Z41__static_initialization_and_destruction_0ii.clone.0 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x50EEF5: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4265AA: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x511D22F: ??? (in /usr/lib64/libstdc++.so.6.0.14) ==25529== by 0x50EE74: __libc_csu_init (elf-init.c:120) ==25529== by 0x55C1B0F: (below main) (in /lib64/libc-2.11.2.so) ==25529== ==25529== Mismatched free() / delete / delete [] ==25529== at 0x4C25F7B: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==25529== by 0x4D25CA: _ZNSt6vectorISt4pairIN5boost9unit_test13basic_cstringIKcEES5_ESaIS6_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS6_S8_EERKS6_.clone.57 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4D3B29: _Z41__static_initialization_and_destruction_0ii.clone.0 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x50EEF5: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4265AA: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x511D22F: ??? (in /usr/lib64/libstdc++.so.6.0.14) ==25529== by 0x50EE74: __libc_csu_init (elf-init.c:120) ==25529== by 0x55C1B0F: (below main) (in /lib64/libc-2.11.2.so) ==25529== Address 0x5904cc0 is 0 bytes inside a block of size 64 alloc'd ==25529== at 0x4C267D0: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==25529== by 0x4D2561: _ZNSt6vectorISt4pairIN5boost9unit_test13basic_cstringIKcEES5_ESaIS6_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS6_S8_EERKS6_.clone.57 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4D3B09: _Z41__static_initialization_and_destruction_0ii.clone.0 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x50EEF5: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4265AA: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x511D22F: ??? (in /usr/lib64/libstdc++.so.6.0.14) ==25529== by 0x50EE74: __libc_csu_init (elf-init.c:120) ==25529== by 0x55C1B0F: (below main) (in /lib64/libc-2.11.2.so) ==25529== ==25529== Mismatched free() / delete / delete [] ==25529== at 0x4C25F7B: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==25529== by 0x4D25CA: _ZNSt6vectorISt4pairIN5boost9unit_test13basic_cstringIKcEES5_ESaIS6_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS6_S8_EERKS6_.clone.57 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4D3B69: _Z41__static_initialization_and_destruction_0ii.clone.0 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x50EEF5: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4265AA: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x511D22F: ??? (in /usr/lib64/libstdc++.so.6.0.14) ==25529== by 0x50EE74: __libc_csu_init (elf-init.c:120) ==25529== by 0x55C1B0F: (below main) (in /lib64/libc-2.11.2.so) ==25529== Address 0x5904d40 is 0 bytes inside a block of size 128 alloc'd ==25529== at 0x4C267D0: operator new(unsigned long) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==25529== by 0x4D2561: _ZNSt6vectorISt4pairIN5boost9unit_test13basic_cstringIKcEES5_ESaIS6_EE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPS6_S8_EERKS6_.clone.57 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4D3B29: _Z41__static_initialization_and_destruction_0ii.clone.0 (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x50EEF5: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x4265AA: ??? (in /var/tmp/ma0/clientRoot/workspace/MyProject/ACore/bin/gcc-4.5/release/coretest) ==25529== by 0x511D22F: ??? (in /usr/lib64/libstdc++.so.6.0.14) ==25529== by 0x50EE74: __libc_csu_init (elf-init.c:120) ==25529== by 0x55C1B0F: (below main) (in /lib64/libc-2.11.2.so) ==25529== Best regards, Ta, Avi