diff --git a/src/hotspot/share/code/icBuffer.cpp b/src/hotspot/share/code/icBuffer.cpp index 1cc58fd..2edef6c 100644 --- a/src/hotspot/share/code/icBuffer.cpp +++ b/src/hotspot/share/code/icBuffer.cpp @@ -224,8 +224,12 @@ void InlineCacheBuffer::release_pending_icholders() { // not safe to free them until them since they might be visible to // another thread. void InlineCacheBuffer::queue_for_release(CompiledICHolder* icholder) { - MutexLockerEx mex(InlineCacheBuffer_lock); + MutexLockerEx mex(InlineCacheBuffer_lock, Mutex::_no_safepoint_check_flag); + if (icholder->is_enqueued()) { + return; + } icholder->set_next(_pending_released); + icholder->set_enqueued(); _pending_released = icholder; _pending_count++; if (TraceICBuffer) {