问题
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