POSIX SIGBUS的可能原因是什么? [英] What are the possible reasons for POSIX SIGBUS?

查看:904
本文介绍了POSIX SIGBUS的可能原因是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序最近使用下列堆栈崩溃:

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?

推荐答案

可能会遇到 BUS错误的主要原因 em>无法访问的内存。这可能是由于许多原因: -

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


  • 通过已删除的指针访问。

  • 通过未初始化指针。

  • 通过NULL指针访问。

  • 访问不是您的地址。可能是由于溢出错误。

  • 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.

这篇关于POSIX SIGBUS的可能原因是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆