Mercurial > hg > truffle
comparison src/os_cpu/linux_x86/vm/os_linux_x86.cpp @ 11029:9ba41a4a71ff
8004124: Handle and/or warn about SI_KERNEL
Summary: Detect this crash in the signal handler and give a fatal error message instead of making us chase down bugs that don't reproduce
Reviewed-by: kvn, mgerdin, dholmes
author | coleenp |
---|---|
date | Fri, 21 Jun 2013 10:50:19 -0400 |
parents | 2cb5d5f6d5e5 |
children | 980532a806a5 5e3b6f79d280 |
comparison
equal
deleted
inserted
replaced
11028:b3cd8b58b798 | 11029:9ba41a4a71ff |
---|---|
284 } | 284 } |
285 #ifdef AMD64 | 285 #ifdef AMD64 |
286 if (pc == (address) FetchNPFI) { | 286 if (pc == (address) FetchNPFI) { |
287 uc->uc_mcontext.gregs[REG_PC] = intptr_t (FetchNResume) ; | 287 uc->uc_mcontext.gregs[REG_PC] = intptr_t (FetchNResume) ; |
288 return 1 ; | 288 return 1 ; |
289 } | |
290 #endif // AMD64 | |
291 | |
292 #ifndef AMD64 | |
293 // Halt if SI_KERNEL before more crashes get misdiagnosed as Java bugs | |
294 // This can happen in any running code (currently more frequently in | |
295 // interpreter code but has been seen in compiled code) | |
296 if (sig == SIGSEGV && info->si_addr == 0 && info->si_code == SI_KERNEL) { | |
297 fatal("An irrecoverable SI_KERNEL SIGSEGV has occurred due " | |
298 "to unstable signal handling in this distribution."); | |
289 } | 299 } |
290 #endif // AMD64 | 300 #endif // AMD64 |
291 | 301 |
292 // Handle ALL stack overflow variations here | 302 // Handle ALL stack overflow variations here |
293 if (sig == SIGSEGV) { | 303 if (sig == SIGSEGV) { |