Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8278239: vmTestbase/nsk/jvmti/RedefineClasses/StressRedefine failed w…
…ith EXCEPTION_ACCESS_VIOLATION at 0x000000000000000d

Backport-of: 2be3e7ef1cff1aae6faf1f4f0545d561af48d0ba
  • Loading branch information
GoeLin committed Jan 6, 2022
1 parent 4a188e9 commit de2e289
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hotspot/share/code/codeCache.cpp
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -1091,7 +1091,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.
Expand All @@ -1111,7 +1111,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()) {
Expand Down

1 comment on commit de2e289

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.