gpt4 book ai didi

c++ - 使用 libc 的 SIGSEGV 回溯是重复条目

转载 作者:行者123 更新时间:2023-11-30 18:00:19 26 4
gpt4 key购买 nike

在转向可用的 execinfo 回溯之前,我正在使用 libunwind。在实现新的回溯之后,我很享受它,直到我从项目中删除了 libunwind 并进行了完全重建。

现在我的回溯函数拒绝从 SIGSEGV 产生正常结果(我知道从那里进行回溯是不安全的),但为什么它之前工作正常?

我现在将发布结果不正确的输出。第一个回溯是一个异常(exception),第二个是有意的 SIGSEGV - 预期结果将是对 __libc_start_main 的跟踪

我记得我读过一些关于信号堆叠问题的内容?

ERROR: FatalException detected: Unable to find string Id STR_PATIENT_LIST in configuration xml file at gui.cpp +1224
===========================================
FATAL STACK BACKTRACE
[bt]: (1 ) [0x1aed350]
[bt]: (2 ) ./ambusergm(getStrIdElement(char const*)+0x1a4) [0xa3d6c]
[bt]: (3 ) ./ambusergm(getCurrentLanguageStr(char const*)+0x18) [0xa4968]
[bt]: (4 ) ./ambusergm(createDialogs+0x70) [0xa4ce4]
[bt]: (5 ) ./ambusergm(handleMenuUniqueIdEvent+0x1278) [0x90030]
[bt]: (6 ) ./ambusergm(menuSelectionInvoke(int, int)+0x278) [0xa14ac]
[bt]: (7 ) ./ambusergm(reloadMenu+0xe0) [0xab51c]
[bt]: (8 ) ./ambusergm(main+0x638) [0x600b0]
[bt]: (9 ) /lib/libc.so.6(__libc_start_main+0x120) [0x402f7fd4]
===========================================

signal 11 (Segmentation fault), address is (nil) from 0x166398
===========================================
CRASH STACK BACKTRACE
[bt]: (1 ) ./ambusergm(MessageBoxDlg::Setup(MessageBoxType, int, int, int, int, wchar_t const*, wchar_t const*)+0x10) [0x166398]
[bt]: (2 ) /lib/libc.so.6(__default_rt_sa_restorer_v2+0) [0x4030e630]
[bt]: (3 ) ./ambusergm(MessageBoxDlg::Setup(MessageBoxType, int, int, int, int, wchar_t const*, wchar_t const*)+0x10) [0x166398]

... repeated to the last entry

[bt]: (49) ./ambusergm(MessageBoxDlg::Setup(MessageBoxType, int, int, int, int, wchar_t const*, wchar_t const*)+0x10) [0x166398]
===========================================

最佳答案

问题恰好是应用程序段在异常处理程序本身中发生故障并递归调用了段错误信号处理程序

关于c++ - 使用 libc 的 SIGSEGV 回溯是重复条目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10650790/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com