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:
Vladimir Kozlov 2019-06-20 10:32:25 -07:00
parent 4934681f19
commit 2ccecc495c
5 changed files with 20 additions and 8 deletions

View file

@ -1473,6 +1473,13 @@ oop nmethod::oop_at(int index) const {
return NativeAccess<AS_NO_KEEPALIVE>::oop_load(oop_addr_at(index));
}
oop nmethod::oop_at_phantom(int index) const {
if (index == 0) {
return NULL;
}
return NativeAccess<ON_PHANTOM_OOP_REF>::oop_load(oop_addr_at(index));
}
//
// Notify all classes this nmethod is dependent on that it is no
// longer dependent. This should only be called in two situations.