首页 > 解决方案 > C++ 多线程程序因 BUS 错误而崩溃

问题描述

我的项目经过 5 天的测试后崩溃了,当我分析转储文件时,它显示为BUS错误

这是我从以下代码中获得的backtrace

Program terminated with signal SIGBUS, Bus error.

#0  0x0000000000000531 in ?? ()
[Current thread is 1 (LWP 902)]
(gdb) bt
#0  0x0000000000000531 in ?? ()
#1  0x000000000041a294 in CUtilsTimer::forgetTimer() ()
#2  0x0000000000415160 in CEMPLinkMonitor::monitor_ethernet_link_status() ()
#3  0x0000000000413fc8 in CEMPTransport::recvEMPData(Emp_Packet*) ()
#4  0x000000000041313c in CEMPRxTransport::run() ()
#5  0x00000000004190a8 in CUtilsThread::runLoop(void*) ()
#6  0x0000007fac289fb8 in ?? () from /lib/libpthread.so.0
#7  0x0000007fa74bdc98 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)

我试图找到根本原因,但无法获得任何破解线索,请帮助

标签: c++multithreadinggdbcoredumpbus-error

解决方案


推荐阅读