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

@ -365,7 +365,7 @@ class nmethod : public CompiledMethod {
// Support for oops in scopes and relocs:
// Note: index 0 is reserved for null.
oop oop_at(int index) const { return index == 0 ? (oop) NULL: *oop_addr_at(index); }
oop oop_at(int index) const;
oop* oop_addr_at(int index) const { // for GC
// relocation indexes are biased by 1 (because 0 is reserved)
assert(index > 0 && index <= oops_count(), "must be a valid non-zero index");