comparison src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp @ 11153:af21010d1062

Merge
author dcubed
date Thu, 18 Jul 2013 12:35:55 -0700
parents 5e3b6f79d280 980532a806a5
children e16282db4946
comparison
equal deleted inserted replaced
11151:5e3b6f79d280 11153:af21010d1062
383 // From IA32 System Programming Guide 383 // From IA32 System Programming Guide
384 enum { 384 enum {
385 trap_page_fault = 0xE 385 trap_page_fault = 0xE
386 }; 386 };
387 387
388 extern "C" void Fetch32PFI () ;
389 extern "C" void Fetch32Resume () ;
390 #ifdef AMD64
391 extern "C" void FetchNPFI () ;
392 extern "C" void FetchNResume () ;
393 #endif // AMD64
394
395 extern "C" JNIEXPORT int 388 extern "C" JNIEXPORT int
396 JVM_handle_bsd_signal(int sig, 389 JVM_handle_bsd_signal(int sig,
397 siginfo_t* info, 390 siginfo_t* info,
398 void* ucVoid, 391 void* ucVoid,
399 int abort_if_unrecognized) { 392 int abort_if_unrecognized) {
456 449
457 //%note os_trap_1 450 //%note os_trap_1
458 if (info != NULL && uc != NULL && thread != NULL) { 451 if (info != NULL && uc != NULL && thread != NULL) {
459 pc = (address) os::Bsd::ucontext_get_pc(uc); 452 pc = (address) os::Bsd::ucontext_get_pc(uc);
460 453
461 if (pc == (address) Fetch32PFI) { 454 if (StubRoutines::is_safefetch_fault(pc)) {
462 uc->context_pc = intptr_t(Fetch32Resume) ; 455 uc->context_pc = intptr_t(StubRoutines::continuation_for_safefetch_fault(pc));
463 return 1 ; 456 return 1;
464 } 457 }
465 #ifdef AMD64
466 if (pc == (address) FetchNPFI) {
467 uc->context_pc = intptr_t (FetchNResume) ;
468 return 1 ;
469 }
470 #endif // AMD64
471 458
472 // Handle ALL stack overflow variations here 459 // Handle ALL stack overflow variations here
473 if (sig == SIGSEGV || sig == SIGBUS) { 460 if (sig == SIGSEGV || sig == SIGBUS) {
474 address addr = (address) info->si_addr; 461 address addr = (address) info->si_addr;
475 462