8212996: Use AS_NO_KEEPALIVE when accessing dead java.lang.invoke.CallSites during nmethod unloading

Reviewed-by: coleenp, pliden
This commit is contained in:
Erik Österlund 2018-11-05 12:36:23 +01:00
parent 364f0784a4
commit 3798a62adb
5 changed files with 15 additions and 7 deletions

View file

@ -42,6 +42,7 @@
#include "logging/logStream.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/access.inline.hpp"
#include "oops/method.inline.hpp"
#include "oops/methodData.hpp"
#include "oops/oop.inline.hpp"
@ -1334,6 +1335,13 @@ void nmethod::flush() {
CodeCache::free(this);
}
oop nmethod::oop_at(int index) const {
if (index == 0) {
return NULL;
}
return NativeAccess<AS_NO_KEEPALIVE>::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.