8278239: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine failed with EXCEPTION_ACCESS_VIOLATION at 0x000000000000000d

Reviewed-by: kvn, sspitsyn, eosterlund
This commit is contained in:
Coleen Phillimore 2021-12-22 17:19:00 +00:00
parent dfb15c3e34
commit 2be3e7ef1c

View File

@ -678,7 +678,7 @@ void CodeCache::nmethods_do(void f(nmethod* nm)) {
void CodeCache::metadata_do(MetadataClosure* f) {
assert_locked_or_safepoint(CodeCache_lock);
NMethodIterator iter(NMethodIterator::only_alive_and_not_unloading);
NMethodIterator iter(NMethodIterator::only_alive);
while(iter.next()) {
iter.method()->metadata_do(f);
}
@ -1032,7 +1032,7 @@ CompiledMethod* CodeCache::find_compiled(void* start) {
}
#if INCLUDE_JVMTI
// RedefineClasses support for unloading nmethods that are dependent on "old" methods.
// RedefineClasses support for saving nmethods that are dependent on "old" methods.
// We don't really expect this table to grow very large. If it does, it can become a hashtable.
static GrowableArray<CompiledMethod*>* old_compiled_method_table = NULL;
@ -1085,7 +1085,7 @@ int CodeCache::mark_dependents_for_evol_deoptimization() {
reset_old_method_table();
int number_of_marked_CodeBlobs = 0;
CompiledMethodIterator iter(CompiledMethodIterator::only_alive_and_not_unloading);
CompiledMethodIterator iter(CompiledMethodIterator::only_alive);
while(iter.next()) {
CompiledMethod* nm = iter.method();
// Walk all alive nmethods to check for old Methods.
@ -1105,7 +1105,7 @@ int CodeCache::mark_dependents_for_evol_deoptimization() {
void CodeCache::mark_all_nmethods_for_evol_deoptimization() {
assert(SafepointSynchronize::is_at_safepoint(), "Can only do this at a safepoint!");
CompiledMethodIterator iter(CompiledMethodIterator::only_alive_and_not_unloading);
CompiledMethodIterator iter(CompiledMethodIterator::only_alive);
while(iter.next()) {
CompiledMethod* nm = iter.method();
if (!nm->method()->is_method_handle_intrinsic()) {