Skip to content

Commit bb56c02

Browse files
committed
8229778: TestJstatdDefaults.java failed due to "fatal error: LEAF method calling lock?"
Reviewed-by: dholmes, dcubed
1 parent 35bfbfd commit bb56c02

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/hotspot/share/runtime/thread.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1803,7 +1803,10 @@ bool JavaThread::reguard_stack(void) {
18031803
void JavaThread::block_if_vm_exited() {
18041804
if (_terminated == _vm_exited) {
18051805
// _vm_exited is set at safepoint, and Threads_lock is never released
1806-
// we will block here forever
1806+
// we will block here forever.
1807+
// Here we can be doing a jump from a safe state to an unsafe state without
1808+
// proper transition, but it happens after the final safepoint has begun.
1809+
set_thread_state(_thread_in_vm);
18071810
Threads_lock->lock();
18081811
ShouldNotReachHere();
18091812
}

0 commit comments

Comments
 (0)