# HG changeset patch # User Doug Simon # Date 1367837542 -7200 # Node ID f64a3fec4e428a289a91e84d122cd153ac78d0fc # Parent a8b4f26d8485a9bd9e3c671d0b954172ec497aa6 exception PC stored in thread is cleared when retrieving continuation for a return address diff -r a8b4f26d8485 -r f64a3fec4e42 src/share/vm/runtime/sharedRuntime.cpp --- a/src/share/vm/runtime/sharedRuntime.cpp Sun May 05 17:42:45 2013 +0200 +++ b/src/share/vm/runtime/sharedRuntime.cpp Mon May 06 12:52:22 2013 +0200 @@ -484,6 +484,12 @@ // Reset method handle flag. thread->set_is_method_handle_return(false); +#ifdef GRAAL + // Graal's ExceptionHandlerStub expects the thread local exception PC to be clear + // and other exception handler continuations do not read it + thread->set_exception_pc(NULL); +#endif + // The fastest case first CodeBlob* blob = CodeCache::find_blob(return_address); nmethod* nm = (blob != NULL) ? blob->as_nmethod_or_null() : NULL; @@ -493,10 +499,6 @@ // native nmethods don't have exception handlers assert(!nm->is_native_method(), "no exception handler"); assert(nm->header_begin() != nm->exception_begin(), "no exception handler"); -#ifdef GRAAL - // Graal's ExceptionHandlerStub expects the exception PC stored in the thread to be 0 - thread->set_exception_pc(NULL); -#endif if (nm->is_deopt_pc(return_address)) { return SharedRuntime::deopt_blob()->unpack_with_exception(); } else {