Skip to content

Commit 3dcfa8b

Browse files
authored
Merge pull request #21537 from fengxue-IS/051-monitorEnter3
(v0.51.0) Fixes preparePinnedVirtualThreadForUnmount assertion
2 parents bdd250d + 523e19a commit 3dcfa8b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

runtime/vm/ContinuationHelpers.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -995,6 +995,8 @@ preparePinnedVirtualThreadForUnmount(J9VMThread *currentThread, j9object_t syncO
995995
if (lock == oldValue) {
996996
/* CAS succeeded, we can proceed with using the inflated monitor. */
997997
VM_ObjectMonitor::incrementCancelCounter(J9OBJECT_CLAZZ(currentThread, syncObj));
998+
/* Either the lock is acquired or FLC bit set, safe to release the inflated monitor. */
999+
omrthread_monitor_exit(monitor);
9981000

9991001
if (J9_FLATLOCK_OWNER(lock) == currentThread) {
10001002
/* Lock is acquired. */

0 commit comments

Comments
 (0)