The mh field in:
struct MethodHandleStubArguments {
const char* adaptername;
oopDesc* mh;
intptr_t* saved_regs;
intptr_t* entry_sp;
};
doesn't always point to a valid object. The oopDesc* is then implicitly converted to an oop here:
void trace_method_handle_stub_wrapper(MethodHandleStubArguments* args) {
trace_method_handle_stub(args->adaptername,
args->mh,
args->saved_regs,
args->entry_sp);
}
This gets caught by my adhoc verification code that verifies oops when they are created/used.
I propose that we don't create an oop until it mh is actually used, and it has been checked that the argument should contain a valid oop.
struct MethodHandleStubArguments {
const char* adaptername;
oopDesc* mh;
intptr_t* saved_regs;
intptr_t* entry_sp;
};
doesn't always point to a valid object. The oopDesc* is then implicitly converted to an oop here:
void trace_method_handle_stub_wrapper(MethodHandleStubArguments* args) {
trace_method_handle_stub(args->adaptername,
args->mh,
args->saved_regs,
args->entry_sp);
}
This gets caught by my adhoc verification code that verifies oops when they are created/used.
I propose that we don't create an oop until it mh is actually used, and it has been checked that the argument should contain a valid oop.
- relates to
-
JDK-8265218 trace_method_handle_stub fails to find calling frame on x86
-
- Resolved
-