简体   繁体   English

回溯从零开始时如何调试崩溃

[英]How to debug crash, when backtrace starts with zero

my long running application crashes randomly with segmentation fault. 我长期运行的应用程序因分段错误而随机崩溃。 When trying to debug the generated coredump, I get stuck with wierd stacktrace: 当尝试调试生成的coredump时,我陷入了奇怪的stacktrace:

(gdb) bt full
#0 __memmove_ssse3 () at ../sysdeps/i386/i686/multiarch/memcpy-ssse3.S:2582
No locals.
#1 0x00000000 in ?? ()
No symbol table info available.

How it can happen, that the backtrace starts at 0x00000000? 回溯开始于0x00000000怎么可能?
What can I do to debug this issue more? 我该怎么做才能进一步调试此问题? I can't run it in gdb as it may take even a week till the crash occures. 我无法在gdb中运行它,因为崩溃可能要花一个星期的时间。

Generally this means that the return address on the stack has been overwritten with 0, probably due to overrunning the end of an on-stack array. 通常,这意味着堆栈上的返回地址已被0覆盖,这可能是由于溢出了堆栈上数组的末尾。 You can trying building with address sanitizer on gcc or clang (if you are using them). 您可以尝试在gcc或clang上使用address sanitizer进行构建(如果正在使用它们)。 Or you can try running with valgrind to see if it will tell you about invalid memory writes. 或者,您可以尝试使用valgrind运行,以查看是否会告诉您有关无效内存写入的信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM