Mercurial > hg > graal-jvmci-8
diff src/share/vm/code/nmethod.cpp @ 23426:682119c4c32e
8058737: CodeCache::find_blob fails with 'unsafe access to zombie method'
Summary: Remove active ICStubs from zombie nmethods
Reviewed-by: kvn, iveresov
author | thartmann |
---|---|
date | Thu, 08 Oct 2015 09:37:23 +0200 |
parents | b12a2a9b05ca |
children | c1950f51ed60 |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Tue Oct 06 12:18:17 2015 +0200 +++ b/src/share/vm/code/nmethod.cpp Thu Oct 08 09:37:23 2015 +0200 @@ -1148,6 +1148,18 @@ } } +// 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() {