C++ Boost program_options crash -
i'm using boost program options project can't program exit without crashing. crashes after exiting main function.
*** glibc detected *** bin/poolserver: double free or corruption (fasttop): 0x0000000002562100 *** ======= backtrace: ========= /lib/libc.so.6(+0x71e16)[0x7f64a7a3be16] /lib/libc.so.6(cfree+0x6c)[0x7f64a7a40b8c] /usr/lib/libstdc++.so.6(_znssd1ev+0x39)[0x7f64a826cee9] /lib/libc.so.6(__cxa_finalize+0xa5)[0x7f64a7a00995] /usr/local/lib/libboost_program_options.so.1.53.0(+0x2a6d6)[0x7f64a85026d6] ======= memory map: ======== 00400000-004a5000 r-xp 00000000 08:01 29687876 /var/coins/poolserver/cmake/build/bin/poolserver 006a4000-006a6000 rw-p 000a4000 08:01 29687876 /var/coins/poolserver/cmake/build/bin/poolserver 02562000-025a5000 rw-p 00000000 00:00 0 [heap] 7f64a0000000-7f64a0021000 rw-p 00000000 00:00 0 7f64a0021000-7f64a4000000 ---p 00000000 00:00 0 7f64a5b2e000-7f64a5b2f000 ---p 00000000 00:00 0 7f64a5b2f000-7f64a632f000 rw-p 00000000 00:00 0 7f64a632f000-7f64a633b000 r-xp 00000000 08:01 9166850 /lib/libnss_files-2.11.3.so 7f64a633b000-7f64a653a000 ---p 0000c000 08:01 9166850 /lib/libnss_files-2.11.3.so 7f64a653a000-7f64a653b000 r--p 0000b000 08:01 9166850 /lib/libnss_files-2.11.3.so 7f64a653b000-7f64a653c000 rw-p 0000c000 08:01 9166850 /lib/libnss_files-2.11.3.so 7f64a653c000-7f64a653d000 ---p 00000000 00:00 0 7f64a653d000-7f64a6d3d000 rw-p 00000000 00:00 0 7f64a6d3d000-7f64a6d44000 r-xp 00000000 08:01 9166856 /lib/librt-2.11.3.so 7f64a6d44000-7f64a6f43000 ---p 00007000 08:01 9166856 /lib/librt-2.11.3.so 7f64a6f43000-7f64a6f44000 r--p 00006000 08:01 9166856 /lib/librt-2.11.3.so 7f64a6f44000-7f64a6f45000 rw-p 00007000 08:01 9166856 /lib/librt-2.11.3.so 7f64a6f45000-7f64a6f5c000 r-xp 00000000 08:01 22677552 /usr/lib/libz.so.1.2.3.4 7f64a6f5c000-7f64a715b000 ---p 00017000 08:01 22677552 /usr/lib/libz.so.1.2.3.4 7f64a715b000-7f64a715c000 rw-p 00016000 08:01 22677552 /usr/lib/libz.so.1.2.3.4 7f64a715c000-7f64a7171000 r-xp 00000000 08:01 9166863 /lib/libnsl-2.11.3.so 7f64a7171000-7f64a7370000 ---p 00015000 08:01 9166863 /lib/libnsl-2.11.3.so 7f64a7370000-7f64a7371000 r--p 00014000 08:01 9166863 /lib/libnsl-2.11.3.so 7f64a7371000-7f64a7372000 rw-p 00015000 08:01 9166863 /lib/libnsl-2.11.3.so 7f64a7372000-7f64a7374000 rw-p 00000000 00:00 0 7f64a7374000-7f64a737c000 r-xp 00000000 08:01 9166865 /lib/libcrypt-2.11.3.so 7f64a737c000-7f64a757b000 ---p 00008000 08:01 9166865 /lib/libcrypt-2.11.3.so 7f64a757b000-7f64a757c000 r--p 00007000 08:01 9166865 /lib/libcrypt-2.11.3.so 7f64a757c000-7f64a757d000 rw-p 00008000 08:01 9166865 /lib/libcrypt-2.11.3.so 7f64a757d000-7f64a75ab000 rw-p 00000000 00:00 0 7f64a75ab000-7f64a75ae000 r-xp 00000000 08:01 12394545 /usr/local/lib/libboost_system.so.1.53.0 7f64a75ae000-7f64a77ad000 ---p 00003000 08:01 12394545 /usr/local/lib/libboost_system.so.1.53.0 7f64a77ad000-7f64a77ae000 rw-p 00002000 08:01 12394545 /usr/local/lib/libboost_system.so.1.53.0 7f64a77ae000-7f64a77c5000 r-xp 00000000 08:01 9166854 /lib/libpthread-2.11.3.so 7f64a77c5000-7f64a79c4000 ---p 00017000 08:01 9166854 /lib/libpthread-2.11.3.so 7f64a79c4000-7f64a79c5000 r--p 00016000 08:01 9166854 /lib/libpthread-2.11.3.so 7f64a79c5000-7f64a79c6000 rw-p 00017000 08:01 9166854 /lib/libpthread-2.11.3.so 7f64a79c6000-7f64a79ca000 rw-p 00000000 00:00 0 7f64a79ca000-7f64a7b23000 r-xp 00000000 08:01 9166859 /lib/libc-2.11.3.so 7f64a7b23000-7f64a7d22000 ---p 00159000 08:01 9166859 /lib/libc-2.11.3.so 7f64a7d22000-7f64a7d26000 r--p 00158000 08:01 9166859 /lib/libc-2.11.3.so 7f64a7d26000-7f64a7d27000 rw-p 0015c000 08:01 9166859 /lib/libc-2.11.3.so 7f64a7d27000-7f64a7d2c000 rw-p 00000000 00:00 0 7f64a7d2c000-7f64a7d42000 r-xp 00000000 08:01 9166851 /lib/libgcc_s.so.1 7f64a7d42000-7f64a7f41000 ---p 00016000 08:01 9166851 /lib/libgcc_s.so.1 7f64a7f41000-7f64a7f42000 rw-p 00015000 08:01 9166851 /lib/libgcc_s.so.1 7f64a7f42000-7f64a7fc2000 r-xp 00000000 08:01 9166872 /lib/libm-2.11.3.so 7f64a7fc2000-7f64a81c2000 ---p 00080000 08:01 9166872 /lib/libm-2.11.3.so 7f64a81c2000-7f64a81c3000 r--p 00080000 08:01 9166872 /lib/libm-2.11.3.so 7f64a81c3000-7f64a81c4000 rw-p 00081000 08:01 9166872 /lib/libm-2.11.3.so 7f64a81c4000-7f64a82ba000 r-xp 00000000 08:01 22677469 /usr/lib/libstdc++.so.6.0.13 7f64a82ba000-7f64a84ba000 ---p 000f6000 08:01 22677469 /usr/lib/libstdc++.so.6.0.13 7f64a84ba000-7f64a84c1000 r--p 000f6000 08:01 22677469 /usr/lib/libstdc++.so.6.0.13 7f64a84c1000-7f64a84c3000 rw-p 000fd000 08:01 22677469 /usr/lib/libstdc++.so.6.0.13 7f64a84c3000-7f64a84d8000 rw-p 00000000 00:00 0 7f64a84d8000-7f64a853c000 r-xp 00000000 08:01 12394575 /usr/local/lib/libboost_program_options.so.1.53.0 7f64a853c000-7f64a873b000 ---p 00064000 08:01 12394575 /usr/local/lib/libboost_program_options.so.1.53.0 7f64a873b000-7f64a8740000 rw-p 00063000 08:01 12394575 /usr/local/lib/libboost_program_options.so.1.53.0 7f64a8740000-7f64a8757000 r-xp 00000000 08:01 12394559 /usr/local/lib/libboost_thread.so.1.53.0 7f64a8757000-7f64a8956000 ---p 00017000 08:01 12394559 /usr/local/lib/libboost_thread.so.1.53.0 7f64a8956000-7f64a8958000 rw-p 00016000 08:01 12394559 /usr/local/lib/libboost_thread.so.1.53.0 7f64a8958000-7f64a8969000 r-xp 00000000 08:01 22682328 /usr/lib/libboost_date_time.so.1.42.0 7f64a8969000-7f64a8b68000 ---p 00011000 08:01 22682328 /usr/lib/libboost_date_time.so.1.42.0 7f64a8b68000-7f64a8b6a000 rw-p 00010000 08:01 22682328 /usr/lib/libboost_date_time.so.1.42.0aborted
i'm using cmake such options:
set(boost_use_static_libs off) set(boost_use_multithreaded on) set(boost_use_static_runtime off) set(boost_all_dyn_link on)
i tried static linking , worked time crashes settings.
os: debian squeeze
if helps https://github.com/intel/poolserver source
your question doesn't give code directly, looking through github, suspect boost program options have nothing it.
the error says
double free or corruption
i suspect it's this:
void databaseconnectionmysql::close() { delete this; }
Comments
Post a Comment