我正在分析核心转储问题。我已经运行valgrind并查看错误日志。但我无法解释以下消息。谁能提供一些见解。 我也试过gdb,但我没有得到太多信息。我已经调查了其他线程,发现它可能是centos问题。我正在使用CentOS 5.6版(最终版)。我听说glibc文件与centos 5.6不兼容,但我不确定。任何人都可以随时面对这个问题
==18035==
==18035== Jump to the invalid address stated on the next line
==18035== at 0x0: ???
==18035== Address 0x0 is not stack'd, malloc'd or (recently) free'd
==18035==
==18035==
==18035== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==18035== Bad permissions for mapped region at address 0x0
==18035== at 0x0: ???
==18035== Invalid free() / delete / delete[]
==18035== at 0x47D951D: free (vg_replace_malloc.c:325)
==18035== by 0x3141CD: ??? (in /lib/libc-2.5.so)
==18035== by 0x313D46: ??? (in /lib/libc-2.5.so)
==18035== by 0x47CC3B2: _vgnU_freeres (vg_preloaded.c:62)
==18035== Address 0x198a55e0 is not stack'd, malloc'd or (recently) free'd
==18035==
答案 0 :(得分:1)
跳转到下一行所述的无效地址
这通常意味着两件事之一:
NULL
或0
s覆盖了返回地址。GDB的崩溃堆栈跟踪可能对此有所帮助。
如果这是一个堆栈损坏问题,请尝试使用AddressSanitizer(与Valgrind不同,它可以很好地检测堆栈溢出)。