8293403: JfrResolution::on_jvmci_resolution crashes when caller is null
Reviewed-by: never
This commit is contained in:
parent
c05015bc93
commit
7c96608d9a
@ -127,8 +127,10 @@ void JfrResolution::on_c2_resolution(const Parse * parse, const ciKlass * holder
|
|||||||
#if INCLUDE_JVMCI
|
#if INCLUDE_JVMCI
|
||||||
// JVMCI
|
// JVMCI
|
||||||
void JfrResolution::on_jvmci_resolution(const Method* caller, const Method* target, TRAPS) {
|
void JfrResolution::on_jvmci_resolution(const Method* caller, const Method* target, TRAPS) {
|
||||||
if (is_compiler_linking_event_writer(target->method_holder()->name(), target->name()) && !IS_METHOD_BLESSED(caller)) {
|
if (is_compiler_linking_event_writer(target->method_holder()->name(), target->name())) {
|
||||||
THROW_MSG(vmSymbols::java_lang_IllegalAccessError(), link_error_msg);
|
if (caller == nullptr || !IS_METHOD_BLESSED(caller)) {
|
||||||
|
THROW_MSG(vmSymbols::java_lang_IllegalAccessError(), link_error_msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -371,6 +371,12 @@ public class TestGetEventWriter {
|
|||||||
throw new AssertionError("Expected IllegalAccessError");
|
throw new AssertionError("Expected IllegalAccessError");
|
||||||
} catch (IllegalAccessError e) {
|
} catch (IllegalAccessError e) {
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
// Test looking up with null caller
|
||||||
|
cp.lookupMethod(cpi, 184, null);
|
||||||
|
throw new AssertionError("Expected IllegalAccessError");
|
||||||
|
} catch (IllegalAccessError e) {
|
||||||
|
}
|
||||||
|
|
||||||
// Ignore all subsequent instructions
|
// Ignore all subsequent instructions
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user