- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
  P2                     
     - 
    Affects Version/s: 9, 10
 - 
    Component/s: hotspot
 
- 
        b21
 - 
        Verified
 
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8303675 | openjdk8u382 | Dongbo He | P2 | Resolved | Fixed | b01 | 
| JDK-8359737 | shenandoah8u382 | Dongbo He | P2 | Resolved | Fixed | b01 | 
                    While running a program that has some StackOverflows we started getting this error.
MISSING EXCEPTION HANDLER for pc 0x00007f0d5d455220 and handler bci -1
Exception:
java.lang.StackOverflowError
- klass: 'java/lang/StackOverflowError'
The catch table looks like this:
catch_pco = 4800 (2 entries)
bci 583 at scope depth 0 -> pco 5393
bci 588 at scope depth 0 -> pco 5413
The call site itself is from a call to the rethrow_Stub in Parse::catch_call_exceptions. Basically we overflow the stack while performing resolution of the exception type and start the lookup over again with a handler_bci of -1. From SharedRuntime::compute_compiled_exc_handler
recursive_exception_occurred = true;
exception = Handle(THREAD, PENDING_EXCEPTION);
CLEAR_PENDING_EXCEPTION;
if (handler_bci >= 0) {
bci = handler_bci;
handler_bci = -1;
skip_scope_increment = true;
}
For C2 the catch tables always have to explicitly include the handler for -1 but they seem to be left out on this path.
MISSING EXCEPTION HANDLER for pc 0x00007f0d5d455220 and handler bci -1
Exception:
java.lang.StackOverflowError
- klass: 'java/lang/StackOverflowError'
The catch table looks like this:
catch_pco = 4800 (2 entries)
bci 583 at scope depth 0 -> pco 5393
bci 588 at scope depth 0 -> pco 5413
The call site itself is from a call to the rethrow_Stub in Parse::catch_call_exceptions. Basically we overflow the stack while performing resolution of the exception type and start the lookup over again with a handler_bci of -1. From SharedRuntime::compute_compiled_exc_handler
recursive_exception_occurred = true;
exception = Handle(THREAD, PENDING_EXCEPTION);
CLEAR_PENDING_EXCEPTION;
if (handler_bci >= 0) {
bci = handler_bci;
handler_bci = -1;
skip_scope_increment = true;
}
For C2 the catch tables always have to explicitly include the handler for -1 but they seem to be left out on this path.
- backported by
 - 
                    
JDK-8303675 missing default exception handler in calls to rethrow_Stub
-         
     - Resolved
 
 -         
 - 
                    
JDK-8359737 missing default exception handler in calls to rethrow_Stub
-         
     - Resolved
 
 -