8058737: CodeCache::find_blob fails with 'unsafe access to zombie method'

Remove active ICStubs from zombie nmethods

Reviewed-by: kvn, iveresov
This commit is contained in:
Tobias Hartmann 2014-09-29 08:40:51 +02:00
parent bea6d40f48
commit d63b9025d8
5 changed files with 27 additions and 4 deletions

View file

@ -1130,6 +1130,18 @@ void nmethod::clear_inline_caches() {
}
}
// Clear ICStubs of all compiled ICs
void nmethod::clear_ic_stubs() {
assert_locked_or_safepoint(CompiledIC_lock);
RelocIterator iter(this);
while(iter.next()) {
if (iter.type() == relocInfo::virtual_call_type) {
CompiledIC* ic = CompiledIC_at(&iter);
ic->clear_ic_stub();
}
}
}
void nmethod::cleanup_inline_caches() {