comparison src/share/vm/runtime/deoptimization.cpp @ 3153:5ca1332171c8

Fixed an issue in the HotSpot code for rethrowing an exception at deopt (wrong values on the expression stack caused a crash when GC and deopt happened at the same time).
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Tue, 05 Jul 2011 18:55:22 +0200
parents 4b63eb1197ca
children 132aa6f2bbc0
comparison
equal deleted inserted replaced
3152:3e89c4c5f37f 3153:5ca1332171c8
1242 int trap_bci = trap_scope->bci(); 1242 int trap_bci = trap_scope->bci();
1243 Bytecodes::Code trap_bc = trap_method->java_code_at(trap_bci); 1243 Bytecodes::Code trap_bc = trap_method->java_code_at(trap_bci);
1244 1244
1245 if (trap_scope->rethrow_exception()) { 1245 if (trap_scope->rethrow_exception()) {
1246 if (TraceDeoptimization) { 1246 if (TraceDeoptimization) {
1247 tty->print_cr("Exception to be rethrown in the interpreter"); 1247 tty->print_cr("Exception to be rethrown in the interpreter for method %s::%s at bci %d", instanceKlass::cast(trap_method->method_holder())->name()->as_C_string(), trap_method->name()->as_C_string(), trap_bci);
1248 } 1248 }
1249 GrowableArray<ScopeValue*>* expressions = trap_scope->expressions(); 1249 GrowableArray<ScopeValue*>* expressions = trap_scope->expressions();
1250 ScopeValue* topOfStack = expressions->top(); 1250 ScopeValue* topOfStack = expressions->top();
1251 Handle topOfStackObj = cvf->create_stack_value(topOfStack)->get_obj(); 1251 Handle topOfStackObj = cvf->create_stack_value(topOfStack)->get_obj();
1252 THREAD->set_pending_exception(topOfStackObj(), NULL, 0); 1252 THREAD->set_pending_exception(topOfStackObj(), NULL, 0);