SIGS EGVエラーおよび処理方法について

2356 ワード


http://blog.csdn.net/brace/article/details/1102422
今日のプログラミングはSIGS EGVエラーにあって、困惑しています。資料を探して、まとめてみます。


   
   
   
   
(1) : SIGSEGV --- Segment Fault. The possible cases of your encountering this error are: 1.buffer overflow --- usually caused by a pointer reference out of range. 2.stack overflow --- please keep in mind that the default stack size is 8192K. 3.illegal file access --- file operations are forbidden on our judge system.
 
 
(2)SIGBUS SIGSEGV : 1) SIGBUS(Bus error) , 。 。 2) SIGSEGV(Segment fault) , 。
 
 
(3)Linux mmap(2) -------------------------------------------------------------------------- SIGSEGV     SIGBUS     , , , 。 --------------------------------------------------------------------------
 
 
, , :
(1)gcc -g         ulimit -c 20000       , core dump       gdb -c core <exec file> 
    
(2) strace execfile, ,