mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8223794: applications/kitchensink/Kitchensink.java crash bad oop with Graal
Added new nmethod::oop_at_phantom() method for JVMCI to notify GC that oop should be kept alive Reviewed-by: dlong, eosterlund
This commit is contained in:
parent
4934681f19
commit
2ccecc495c
5 changed files with 20 additions and 8 deletions
|
@ -2416,7 +2416,7 @@ C2V_VMENTRY_0(jlong, translate, (JNIEnv* env, jobject, jobject obj_handle))
|
|||
if (peerEnv->is_hotspot()) {
|
||||
// Only the mirror in the HotSpot heap is accessible
|
||||
// through JVMCINMethodData
|
||||
oop nmethod_mirror = data->get_nmethod_mirror(nm);
|
||||
oop nmethod_mirror = data->get_nmethod_mirror(nm, /* phantom_ref */ true);
|
||||
if (nmethod_mirror != NULL) {
|
||||
result = HotSpotJVMCI::wrap(nmethod_mirror);
|
||||
}
|
||||
|
@ -2443,7 +2443,7 @@ C2V_VMENTRY_0(jlong, translate, (JNIEnv* env, jobject, jobject obj_handle))
|
|||
if (data == NULL) {
|
||||
JVMCI_THROW_MSG_0(IllegalArgumentException, "Cannot set HotSpotNmethod mirror for default nmethod");
|
||||
}
|
||||
if (data->get_nmethod_mirror(nm) != NULL) {
|
||||
if (data->get_nmethod_mirror(nm, /* phantom_ref */ false) != NULL) {
|
||||
JVMCI_THROW_MSG_0(IllegalArgumentException, "Cannot overwrite existing HotSpotNmethod mirror for nmethod");
|
||||
}
|
||||
oop nmethod_mirror = HotSpotJVMCI::resolve(result);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue