8213565: Crash in DependencyContext::remove_dependent_nmethod

Reviewed-by: rehn, kvn
This commit is contained in:
Erik Österlund 2018-11-30 11:40:48 +01:00
parent a2bbc9c091
commit 3a5bccf5c6
18 changed files with 320 additions and 213 deletions

View file

@ -29,6 +29,7 @@
#include "code/codeHeapState.hpp"
#include "code/compiledIC.hpp"
#include "code/dependencies.hpp"
#include "code/dependencyContext.hpp"
#include "code/icBuffer.hpp"
#include "code/nmethod.hpp"
#include "code/pcDesc.hpp"
@ -940,6 +941,19 @@ void CodeCache::increment_unloading_cycle() {
}
}
CodeCache::UnloadingScope::UnloadingScope(BoolObjectClosure* is_alive)
: _is_unloading_behaviour(is_alive)
{
IsUnloadingBehaviour::set_current(&_is_unloading_behaviour);
increment_unloading_cycle();
DependencyContext::cleaning_start();
}
CodeCache::UnloadingScope::~UnloadingScope() {
IsUnloadingBehaviour::set_current(NULL);
DependencyContext::cleaning_end();
}
void CodeCache::verify_oops() {
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
VerifyOopClosure voc;