Skip to content

Commit

Permalink
Clear vmthread from thread object at shutdown
Browse files Browse the repository at this point in the history
Related to: #16659

Signed-off-by: Tobi Ajila <[email protected]>
  • Loading branch information
tajila committed Oct 19, 2023
1 parent 7cf716a commit 6575206
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions runtime/vm/vmthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@ void threadCleanup(J9VMThread * vmThread, UDATA forkedByVM)
/* Do the java dance to indicate thread death */
acquireVMAccess(vmThread);
cleanUpAttachedThread(vmThread);
/* Cleanup code is not guaranteed to run succesfully. Remove any connection
* to the thread object before deallocating the j9vmthread.
*/
J9VMJAVALANGTHREAD_SET_THREADREF(vmThread, vmThread->threadObject, NULL);
releaseVMAccess(vmThread);


Expand Down

0 comments on commit 6575206

Please sign in to comment.