8026328: Setting a breakpoint on invokedynamic crashes the JVM

Reviewed-by: jrose, roland
This commit is contained in:
Christian Thalinger 2013-10-24 16:23:07 -07:00
parent fedbc5721f
commit 9620913796
18 changed files with 143 additions and 129 deletions

View file

@ -329,15 +329,21 @@ void AbstractInterpreter::print_method_kind(MethodKind kind) {
//------------------------------------------------------------------------------------------------------------------------
// Deoptimization support
// If deoptimization happens, this function returns the point of next bytecode to continue execution
/**
* If a deoptimization happens, this function returns the point of next bytecode to continue execution.
*/
address AbstractInterpreter::deopt_continue_after_entry(Method* method, address bcp, int callee_parameters, bool is_top_frame) {
assert(method->contains(bcp), "just checkin'");
Bytecodes::Code code = Bytecodes::java_code_at(method, bcp);
// Get the original and rewritten bytecode.
Bytecodes::Code code = Bytecodes::java_code_at(method, bcp);
assert(!Interpreter::bytecode_should_reexecute(code), "should not reexecute");
int bci = method->bci_from(bcp);
int length = -1; // initial value for debugging
const int bci = method->bci_from(bcp);
// compute continuation length
length = Bytecodes::length_at(method, bcp);
const int length = Bytecodes::length_at(method, bcp);
// compute result type
BasicType type = T_ILLEGAL;
@ -393,7 +399,7 @@ address AbstractInterpreter::deopt_continue_after_entry(Method* method, address
return
is_top_frame
? Interpreter::deopt_entry (as_TosState(type), length)
: Interpreter::return_entry(as_TosState(type), length);
: Interpreter::return_entry(as_TosState(type), length, code);
}
// If deoptimization happens, this function returns the point where the interpreter reexecutes