展开导致分段错误
我正在使用向后cpp(https://github.com/bombela/backward-cpp ) 打印堆栈跟踪。然而,这会导致分段错误。以下是堆栈的 gdb 跟踪:
0x00007ffff608e357 in _Unwind_Backtrace () from /lib/x86_64-linux-gnu/libgcc_s.so.1
(gdb) bt full
#0 0x00007ffff608e357 in _Unwind_Backtrace () from /lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#1 0x000055555567225c in backward::details::Unwinder<backward::StackTraceImpl<backward::system_tag::linux_tag>::callback>::operator() (this=0x7ffff7ee7410, f=..., depth=32)
at inc/backward.hpp:814
No locals.
#2 0x000055555566d66a in backward::details::unwind<backward::StackTraceImpl<backward::system_tag::linux_tag>::callback> (f=..., depth=32) at inc/backward.hpp:857
unwinder = {_f = 0x7ffff7ee7408, _index = 13, _depth = 32}
#3 0x00005555556666d2 in backward::StackTraceImpl<backward::system_tag::linux_tag>::load_here (this=0x7ffff7ee74c0, depth=32, context=0x0, error_addr=0x0) at inc/backward.hpp:875
trace_cnt = 140732520194072
我使用 -g 编译了代码。我该如何解决这个问题?
I am using backward-cpp (https://github.com/bombela/backward-cpp) to print the stack trace. However, this gives segmentation fault. Following is the gdb trace of the stack :
0x00007ffff608e357 in _Unwind_Backtrace () from /lib/x86_64-linux-gnu/libgcc_s.so.1
(gdb) bt full
#0 0x00007ffff608e357 in _Unwind_Backtrace () from /lib/x86_64-linux-gnu/libgcc_s.so.1
No symbol table info available.
#1 0x000055555567225c in backward::details::Unwinder<backward::StackTraceImpl<backward::system_tag::linux_tag>::callback>::operator() (this=0x7ffff7ee7410, f=..., depth=32)
at inc/backward.hpp:814
No locals.
#2 0x000055555566d66a in backward::details::unwind<backward::StackTraceImpl<backward::system_tag::linux_tag>::callback> (f=..., depth=32) at inc/backward.hpp:857
unwinder = {_f = 0x7ffff7ee7408, _index = 13, _depth = 32}
#3 0x00005555556666d2 in backward::StackTraceImpl<backward::system_tag::linux_tag>::load_here (this=0x7ffff7ee74c0, depth=32, context=0x0, error_addr=0x0) at inc/backward.hpp:875
trace_cnt = 140732520194072
I compiled the code with -g. How can I resolve the issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论