What are the possible reasons for POSIX SIGBUS?

落花浮王杯 提交于 2019-12-11 11:35:33

问题


My program recently crashed with following stack;

Program terminated with signal 7, Bus error.
#0  0x00007f0f323beb55 in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f0f323beb55 in raise () from /lib64/libc.so.6
#1  0x00007f0f35f8042e in skgesigOSCrash () from /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1
#2  0x00007f0f36222ca9 in kpeDbgSignalHandler () from /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1
#3  0x00007f0f35f8063e in skgesig_sigactionHandler () from /usr/lib/oracle/11.2/client64/lib/libclntsh.so.11.1
#4  <signal handler called>

Could someone tell me what should i check in my code to avoid this? or is this something oracle should fix?


回答1:


Main reasons you could get BUS error revolves around inaccessible memory. This could be due to many reasons:-

  • Accessing through deleted pointer.
  • Accessing through uninitialized pointer.
  • Accessing through NULL pointer.
  • Accessing the address which is not yours. could be due to overflow errors.


来源:https://stackoverflow.com/questions/27615147/what-are-the-possible-reasons-for-posix-sigbus

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!