We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea58344 commit 0146077Copy full SHA for 0146077
src/hotspot/share/prims/jvmtiTagMap.cpp
@@ -1204,8 +1204,10 @@ void JvmtiTagMap::flush_object_free_events() {
1204
assert_not_at_safepoint();
1205
if (env()->is_enabled(JVMTI_EVENT_OBJECT_FREE)) {
1206
{
1207
+ // The other thread can block for safepoints during event callbacks, so ensure we
1208
+ // are safepoint-safe while waiting.
1209
+ ThreadBlockInVM tbivm(JavaThread::current());
1210
MonitorLocker ml(lock(), Mutex::_no_safepoint_check_flag);
- // If another thread is posting events, let it finish
1211
while (_posting_events) {
1212
ml.wait();
1213
}
0 commit comments