diff -r 28d2f9c907b4 src/share/vm/opto/doCall.cpp --- a/src/share/vm/opto/doCall.cpp +++ b/src/share/vm/opto/doCall.cpp @@ -672,6 +672,7 @@ GrowableArray* extypes = new (C->node_arena()) GrowableArray(C->node_arena(), 8, 0, NULL); GrowableArray* saw_unloaded = new (C->node_arena()) GrowableArray(C->node_arena(), 8, 0, 0); + bool default_handler = false; for (; !handlers.is_done(); handlers.next()) { ciExceptionHandler* h = handlers.handler(); int h_bci = h->handler_bci(); @@ -694,6 +695,14 @@ // Note: It's OK if the BCIs repeat themselves. bcis->append(h_bci); extypes->append(h_extype); + if (h_bci == -1) { + default_handler = true; + } + } + + if (!default_handler) { + bcis->append(-1); + extypes->append(TypeOopPtr::make_from_klass(env()->Throwable_klass())->is_instptr()); } int len = bcis->length();