8240693: Sweeper should not examine dying metadata in is_unloading() nmethod during static call stub cleaning

Reviewed-by: kvn, coleenp, pliden
This commit is contained in:
Erik Österlund 2020-04-08 15:34:56 +00:00
parent 76a8557d0c
commit a5b81d97f9
2 changed files with 7 additions and 2 deletions

View file

@ -1073,8 +1073,8 @@ void CodeCache::old_nmethods_do(MetadataClosure* f) {
length = old_compiled_method_table->length();
for (int i = 0; i < length; i++) {
CompiledMethod* cm = old_compiled_method_table->at(i);
// Only walk alive nmethods, the dead ones will get removed by the sweeper.
if (cm->is_alive()) {
// Only walk alive nmethods, the dead ones will get removed by the sweeper or GC.
if (cm->is_alive() && !cm->is_unloading()) {
old_compiled_method_table->at(i)->metadata_do(f);
}
}