350 return addr != NULL; |
350 return addr != NULL; |
351 #endif // AMD64 |
351 #endif // AMD64 |
352 |
352 |
353 } |
353 } |
354 |
354 |
355 extern "C" void Fetch32PFI () ; |
|
356 extern "C" void Fetch32Resume () ; |
|
357 #ifdef AMD64 |
|
358 extern "C" void FetchNPFI () ; |
|
359 extern "C" void FetchNResume () ; |
|
360 #endif // AMD64 |
|
361 |
|
362 extern "C" JNIEXPORT int |
355 extern "C" JNIEXPORT int |
363 JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, |
356 JVM_handle_solaris_signal(int sig, siginfo_t* info, void* ucVoid, |
364 int abort_if_unrecognized) { |
357 int abort_if_unrecognized) { |
365 ucontext_t* uc = (ucontext_t*) ucVoid; |
358 ucontext_t* uc = (ucontext_t*) ucVoid; |
366 |
359 |
434 //%note os_trap_1 |
427 //%note os_trap_1 |
435 if (info != NULL && uc != NULL && thread != NULL) { |
428 if (info != NULL && uc != NULL && thread != NULL) { |
436 // factor me: getPCfromContext |
429 // factor me: getPCfromContext |
437 pc = (address) uc->uc_mcontext.gregs[REG_PC]; |
430 pc = (address) uc->uc_mcontext.gregs[REG_PC]; |
438 |
431 |
439 // SafeFetch32() support |
432 if (StubRoutines::is_safefetch_fault(pc)) { |
440 if (pc == (address) Fetch32PFI) { |
433 uc->uc_mcontext.gregs[REG_PC] = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc)); |
441 uc->uc_mcontext.gregs[REG_PC] = intptr_t(Fetch32Resume) ; |
434 return true; |
442 return true ; |
435 } |
443 } |
|
444 #ifdef AMD64 |
|
445 if (pc == (address) FetchNPFI) { |
|
446 uc->uc_mcontext.gregs [REG_PC] = intptr_t(FetchNResume) ; |
|
447 return true ; |
|
448 } |
|
449 #endif // AMD64 |
|
450 |
436 |
451 // Handle ALL stack overflow variations here |
437 // Handle ALL stack overflow variations here |
452 if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { |
438 if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { |
453 address addr = (address) info->si_addr; |
439 address addr = (address) info->si_addr; |
454 if (thread->in_stack_yellow_zone(addr)) { |
440 if (thread->in_stack_yellow_zone(addr)) { |