From 44277db2ded3833d5275be7773a2a819afa69052 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 6 Mar 2012 13:03:42 -0700 Subject: [PATCH] fix handling of exceptions thrown from interpreter during method invocation Since we use Thread::code to store a reference to either the method to be invoked or the current bytecode being executed depending on the context, we must be careful to switch it back to the bytecode of the exception handler if an exception is thrown while invoking a method (e.g. an UnsatisfiedLinkError). --- src/interpret.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/interpret.cpp b/src/interpret.cpp index 6e04cd4942..6f3c853ec6 100644 --- a/src/interpret.cpp +++ b/src/interpret.cpp @@ -758,6 +758,8 @@ interpret3(Thread* t, const int base) object& exception = t->exception; uintptr_t* stack = t->stack; + code = methodCode(t, frameMethod(t, frame)); + if (UNLIKELY(exception)) { goto throw_; }