double free or corruption (!prev)
作者:互联网
环境:linux,g++4.9,qt4.8.7
关闭应用程序时崩溃,下面是qtcreator应用程序输出窗口信息:
*** Error in `/home/test/source/Ofd_Pro_Master/build-surSenReader_all-unknown-u8c03u8bd5/surSenReader': double free or corruption (!prev): 0x00000000013248a0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ffff3f9b7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7ffff3fa437a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ffff3fa853c]
/opt/sursen/sep4/filter/liboec.so(+0x5cb3f)[0x7fffdf031b3f]
/lib64/ld-linux-x86-64.so.2(+0x10f37)[0x7ffff7de7f37]
/lib/x86_64-linux-gnu/libc.so.6(+0x39ff8)[0x7ffff3f5dff8]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7ffff3f5e045]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7ffff3f44837]
/home/test/source/Ofd_Pro_Master/build-surSenReader_all-unknown-u8c03u8bd5/surSenReader[0x433379]
======= Memory map: ========
00400000-00893000 r-xp 00000000 08:02 1578200 /home/test/source/Ofd_Pro_Master/build-surSenReader_all-unknown-u8c03u8bd5/surSenReader
00a92000-00a93000 r--p 00492000 08:02 1578200 /home/test/source/Ofd_Pro_Master/build-surSenReader_all-unknown-u8c03u8bd5/surSenReader
00a93000-00a9b000 rw-p 00493000 08:02 1578200 /home/test/source/Ofd_Pro_Master/build-surSenReader_all-unknown-u8c03u8bd5/surSenReader
00a9b000-018b9000 rw-p 00000000 00:00 0 [heap]
根据Backtrace的提示,只有liboec.so不是系统文件,重复释放应该是在liboec.so进行的,将liboec.so用源码重新编译并替换,再次运行,即可定位到源文件出错行。
截图:
ps:同样的代码,windows下的release版本崩溃,debug不崩溃;linux的debug崩溃,release不崩溃。
标签:x86,libc,double,64,so.6,linux,surSenReader,prev,corruption 来源: https://blog.csdn.net/dragoo1/article/details/119448444