8209670: CompilerThread releasing code buffer in destructor is unsafe

Don't free temporary code buffers in compiler thread destructor to avoid interference with safepoint code.

Reviewed-by: kvn, dholmes, zgu
This commit is contained in:
Tobias Hartmann 2018-08-21 17:47:59 +02:00
parent ea4f2f60d5
commit aef7c93375
2 changed files with 11 additions and 5 deletions

View file

@ -3298,11 +3298,6 @@ CompilerThread::CompilerThread(CompileQueue* queue,
}
CompilerThread::~CompilerThread() {
// Free buffer blob, if allocated
if (get_buffer_blob() != NULL) {
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
CodeCache::free(get_buffer_blob());
}
// Delete objects which were allocated on heap.
delete _counters;
}