Skip to content

Commit

Permalink
Merge pull request #3256 from yanluo7/fix_CS_assert
Browse files Browse the repository at this point in the history
Ensure  J9VMJAVAUTILCONCURRENTLOCKSABSTRACTOWNABLESYNCHRONIZER uses currentThread to address CS copy issue
  • Loading branch information
amicic authored Oct 15, 2018
2 parents 6cf5b4c + 019b7f4 commit a82f40e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/util/thrinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,15 @@ getVMThreadStateHelper(J9VMThread *targetThread,
lockOwnerObject = J9OBJECT_FROM_FJ9OBJECT(targetThread->javaVM, fobj);
}
#else
/* Simplify the macro usage by using the _VM version so we do not need to pass in the current thread */
lockOwnerObject =
J9VMJAVAUTILCONCURRENTLOCKSABSTRACTOWNABLESYNCHRONIZER_EXCLUSIVEOWNERTHREAD(targetThread, lockObject);
J9VMJAVAUTILCONCURRENTLOCKSABSTRACTOWNABLESYNCHRONIZER_EXCLUSIVEOWNERTHREAD_VM(targetThread->javaVM, lockObject);
#endif
if (lockOwnerObject) {
#if defined(J9VM_OUT_OF_PROCESS)
lockOwner = (J9VMThread *)(UDATA)readObjectField(lockOwnerObject, READCLAZZ(targetThread, lockOwnerObject), "threadRef", "J", sizeof(jlong));
#else
lockOwner = (J9VMThread *)J9VMJAVALANGTHREAD_THREADREF(targetThread, lockOwnerObject);
lockOwner = (J9VMThread *)J9VMJAVALANGTHREAD_THREADREF_VM(targetThread->javaVM, lockOwnerObject);
#endif
}
}
Expand Down

0 comments on commit a82f40e

Please sign in to comment.