我有以下核心转储:
pth_signal.pthread_kill(??, ??) at 0xd0124734
pth_signal._p_raise(??) at 0xd01241a4
raise.raise(??) at 0xd038acd0
abort.abort() at 0xd03eeb78
_ZN10__cxxabiv111__terminateEPFvvE(handler = ??), line 47 in "eh_terminate.cc"
_ZSt9terminatev(), line 57 in "eh_terminate.cc"
__cxa_throw(obj = ??, tinfo = ??, dest = ??), line 77 in "eh_throw.cc"
unnamed block in _Znwm(sz = 4048060128), line 54 in "new_op.cc"
unnamed block in _Znwm(sz = 4048060128), line 54 in "new_op.cc"
unnamed block in _Znwm(sz = 4048060128), line 54 in "new_op.cc"
_Znwm(sz = 4048060128), line 54 in "new_op.cc"
_Znam(sz = ??), line 36 in "new_opv.cc"
_ZN7PROFILEC1ERK6STRING(this = @0x2fe74398, iniFilename = @0x21973300), line 99 in "profile.cpp"
_ZN2IE17AppendToBDataListEP10BASKETDATA(this = @0x2130eb38, bd = 0x2fe7f000), line 2451 in "ie.cpp"
_ZN5DIEGO14HandleResponseEP10BASKETDATAPv(this = 0x2130eb38, bd = 0x2fe7f000, args = 0x2fe71d78), line 513 in "diegoclass.cpp"
_ZThn68_N5DIEGO14HandleResponseEP10BASKETDATAPv(0x2130eb7c, 0x2fe7f000, 0x2fe71d78), line 21 in "diegoclass.h"
_ZN8KOBJBASE8dispatchEiP10BASKETDATAPv(this = 0x2130eb7c, fcnidx = 12, bd = 0x2fe7f000, args = 0x2fe71d78), line 67 in "kobjbase.cpp"
_ZN6KERNEL8DispatchEPcS0_iP10BASKETDATAPvR4LISTI8KOBJBASEE(this = @0x2fe71d38, module = "diego", method = "HandleResponse", fcn_idx = 12, bd = 0x2fe7f000, args = 0x2fe71d78, thread_objects = @0xf156dd58), line 1118 in "skernel.cpp"
unnamed block in _ZN6KERNEL9ExecuteTXEP10BASKETDATA(this = @0x2fe71d38, bd = 0x2fe7f000), line 224 in "txthread.cpp"
unnamed block in _ZN6KERNEL9ExecuteTXEP10BASKETDATA(this = @0x2fe71d38, bd = 0x2fe7f000), line 224 in "txthread.cpp"
_ZN6KERNEL9ExecuteTXEP10BASKETDATA(this = @0x2fe71d38, bd = 0x2fe7f000), line 224 in "txthread.cpp"
unnamed block in _ZN6KERNEL22ProcessEnqueuedBasketsEP6BASKET(this = @0x2fe71d38, b = @0x2fe7ef68), line 1162 in "skernel.cpp"
如何使用核心转储来修复我遇到的崩溃?
答案1
首先,通过 运行该输出c++filt
,它将 C++ 符号分解为人类可读的、源代码可交叉引用的输出。
从那里您可以看到 PROFILE 构造函数已被调用new[]
,这导致引发异常,而没有处理程序(调用 std::terminate),这导致程序中止,生成核心转储。
您可以将调用包装new[]
在一个try...catch
块中以查看异常是什么。我记不清new[]
在什么情况下会引发哪些异常,但new
失败的原因之一是堆损坏,通常是由于覆盖分配或 double 的边界delete
。
valgrind
您可以使用(免费)或purify
(商业,假设它仍然存在 - 我上次使用它是在 15 年前)之类的程序来诊断这些内存错误。valgrind
这将是一个好的开始,它会告诉你你对上述表格的记忆错误。
您可以更深入地使用核心转储gdb
来检查程序崩溃时的内存映像,但这里没有人可以真正帮助您 - 您需要知道代码的结构以及预期的内存布局与此有关。