Skip to content

Commit

Permalink
Merge pull request #15039 from hangshao0/master
Browse files Browse the repository at this point in the history
Correctly use the return value of checkForCyclicalVerification()
  • Loading branch information
tajila committed May 12, 2022
2 parents 4f26e7b + 27723fd commit 8578238
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions runtime/vm/ClassInitialization.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2020 IBM Corp. and others
* Copyright (c) 1991, 2022 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -76,10 +76,10 @@ compareRAMClasses(void *item, J9StackElement *currentElement)
}

static BOOLEAN
checkForCyclicalVerification(J9VMThread *currentThread, J9ClassLoader *classLoader, J9Class *ramClass)
isCyclePresentInVerification(J9VMThread *currentThread, J9ClassLoader *classLoader, J9Class *ramClass)
{
J9JavaVM *javaVM = currentThread->javaVM;
return verifyLoadingOrLinkingStack(currentThread, classLoader, ramClass, &currentThread->verificationStack, &compareRAMClasses, javaVM->verificationMaxStack, javaVM->valueTypeVerificationStackPool, FALSE, FALSE);
return !verifyLoadingOrLinkingStack(currentThread, classLoader, ramClass, &currentThread->verificationStack, &compareRAMClasses, javaVM->verificationMaxStack, javaVM->valueTypeVerificationStackPool, FALSE, FALSE);
}

static void
Expand Down Expand Up @@ -450,7 +450,7 @@ classInitStateMachine(J9VMThread *currentThread, J9Class *clazz, J9ClassInitStat

if (isStatic) {
omrthread_monitor_enter(vm->valueTypeVerificationMutex);
BOOLEAN cycleDetected = checkForCyclicalVerification(currentThread, entryClazz->classLoader, entryClazz);
BOOLEAN cycleDetected = isCyclePresentInVerification(currentThread, entryClazz->classLoader, entryClazz);
omrthread_monitor_exit(vm->valueTypeVerificationMutex);

/* It is legal for verification cycles to occur when verifying static flattenable fields
Expand Down

0 comments on commit 8578238

Please sign in to comment.