comparison src/share/vm/runtime/sweeper.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 ce8f6bb717c9
children be740540f60c
comparison
equal deleted inserted replaced
23425:aa97f9321b9c 23426:682119c4c32e
540 // stack we can safely convert it to a zombie method 540 // stack we can safely convert it to a zombie method
541 if (nm->can_not_entrant_be_converted()) { 541 if (nm->can_not_entrant_be_converted()) {
542 if (PrintMethodFlushing && Verbose) { 542 if (PrintMethodFlushing && Verbose) {
543 tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm); 543 tty->print_cr("### Nmethod %3d/" PTR_FORMAT " (not entrant) being made zombie", nm->compile_id(), nm);
544 } 544 }
545 // Clear ICStubs to prevent back patching stubs of zombie or unloaded
546 // nmethods during the next safepoint (see ICStub::finalize).
547 MutexLocker cl(CompiledIC_lock);
548 nm->clear_ic_stubs();
545 // Code cache state change is tracked in make_zombie() 549 // Code cache state change is tracked in make_zombie()
546 nm->make_zombie(); 550 nm->make_zombie();
547 _zombified_count++; 551 _zombified_count++;
548 SWEEP(nm); 552 SWEEP(nm);
549 } else { 553 } else {