414 else if (sig == SIGTRAP && TrapBasedICMissChecks &&
415 nativeInstruction_at(pc)->is_sigtrap_ic_miss_check()) {
416 if (TraceTraps) {
417 tty->print_cr("trap: ic_miss_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
418 }
419 stub = SharedRuntime::get_ic_miss_stub();
420 }
421
422 // SIGTRAP-based implicit null check in compiled code.
423 else if (sig == SIGTRAP && TrapBasedNullChecks &&
424 nativeInstruction_at(pc)->is_sigtrap_null_check()) {
425 if (TraceTraps) {
426 tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
427 }
428 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
429 }
430
431 // SIGSEGV-based implicit null check in compiled code.
432 else if (sig == SIGSEGV && ImplicitNullChecks &&
433 CodeCache::contains((void*) pc) &&
434 !MacroAssembler::needs_explicit_null_check((intptr_t) info->si_addr)) {
435 if (TraceTraps) {
436 tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc));
437 }
438 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
439 }
440
441 #ifdef COMPILER2
442 // SIGTRAP-based implicit range check in compiled code.
443 else if (sig == SIGTRAP && TrapBasedRangeChecks &&
444 nativeInstruction_at(pc)->is_sigtrap_range_check()) {
445 if (TraceTraps) {
446 tty->print_cr("trap: range_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
447 }
448 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
449 }
450 #endif
451 else if (sig == SIGBUS) {
452 // BugId 4454115: A read from a MappedByteBuffer can fault here if the
453 // underlying file has been truncated. Do not crash the VM in such a case.
454 CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
|
414 else if (sig == SIGTRAP && TrapBasedICMissChecks &&
415 nativeInstruction_at(pc)->is_sigtrap_ic_miss_check()) {
416 if (TraceTraps) {
417 tty->print_cr("trap: ic_miss_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
418 }
419 stub = SharedRuntime::get_ic_miss_stub();
420 }
421
422 // SIGTRAP-based implicit null check in compiled code.
423 else if (sig == SIGTRAP && TrapBasedNullChecks &&
424 nativeInstruction_at(pc)->is_sigtrap_null_check()) {
425 if (TraceTraps) {
426 tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
427 }
428 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
429 }
430
431 // SIGSEGV-based implicit null check in compiled code.
432 else if (sig == SIGSEGV && ImplicitNullChecks &&
433 CodeCache::contains((void*) pc) &&
434 MacroAssembler::uses_implicit_null_check(info->si_addr)) {
435 if (TraceTraps) {
436 tty->print_cr("trap: null_check at " INTPTR_FORMAT " (SIGSEGV)", p2i(pc));
437 }
438 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
439 }
440
441 #ifdef COMPILER2
442 // SIGTRAP-based implicit range check in compiled code.
443 else if (sig == SIGTRAP && TrapBasedRangeChecks &&
444 nativeInstruction_at(pc)->is_sigtrap_range_check()) {
445 if (TraceTraps) {
446 tty->print_cr("trap: range_check at " INTPTR_FORMAT " (SIGTRAP)", p2i(pc));
447 }
448 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL);
449 }
450 #endif
451 else if (sig == SIGBUS) {
452 // BugId 4454115: A read from a MappedByteBuffer can fault here if the
453 // underlying file has been truncated. Do not crash the VM in such a case.
454 CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
|