Skip to content

Commit

Permalink
Merge pull request #16554 from LinHu2016/GC_Loom_update_5
Browse files Browse the repository at this point in the history
Fix assertion failure in verifyContinuationList mode
  • Loading branch information
dmitripivkine committed Jan 17, 2023
2 parents d7ca157 + 1c5fa4e commit de74266
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/gc_base/GCExtensions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,13 @@ MM_GCExtensions::releaseNativesForContinuationObject(MM_EnvironmentBase* env, j9

if (verify_continuation_list == continuationListOption) {
J9VMContinuation *continuation = J9VMJDKINTERNALVMCONTINUATION_VMREF(vmThread, objectPtr);
Assert_GC_true_with_message2(env, (NULL == continuation), "Continuation expected to be NULL, but it is %p, from Continuation object %p\n", continuation, objectPtr);
jboolean finished = J9VMJDKINTERNALVMCONTINUATION_FINISHED(vmThread, objectPtr);
/* there might be potential case that GC would happen between JVM_VirtualThreadUnmountBegin() and JVM_VirtualThreadUnmountEnd() and
* last unmounted continuation Object is marked as "dead", but the related J9VMContinuation has not been freed up.
*/
if (!finished) {
Assert_GC_true_with_message2(env, (NULL == continuation), "Continuation expected to be NULL, but it is %p, from Continuation object %p\n", continuation, objectPtr);
}
} else {
getJavaVM()->internalVMFunctions->freeContinuation(vmThread, objectPtr);
}
Expand Down

0 comments on commit de74266

Please sign in to comment.