Skip to content

Commit 976c2bb

Browse files
committed
8277212: GC accidentally cleans valid megamorphic vtable inline caches
Reviewed-by: eosterlund, pliden, coleenp, thartmann
1 parent 03f8c0f commit 976c2bb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/hotspot/share/code/compiledMethod.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,10 @@ bool CompiledMethod::clean_ic_if_metadata_is_dead(CompiledIC *ic) {
478478
} else {
479479
ShouldNotReachHere();
480480
}
481+
} else {
482+
// This inline cache is a megamorphic vtable call. Those ICs never hold
483+
// any Metadata and should therefore never be cleaned by this function.
484+
return true;
481485
}
482486
}
483487

0 commit comments

Comments
 (0)