Skip to content

Commit

Permalink
Merge pull request #6887 from a7ehuo/fix-canFoldNonOverriddenGuard
Browse files Browse the repository at this point in the history
Check receiver class initialized or not before checking overridden bits
  • Loading branch information
jdmpapin committed Feb 15, 2023
2 parents 78660b1 + d6bf148 commit 15d8a0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/optimizer/VPHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5276,7 +5276,9 @@ static bool canFoldNonOverriddenGuard(OMR::ValuePropagation *vp, TR::Node *callN
methodSymbol->isVirtual())
{
TR::ResolvedMethodSymbol * resolvedMethodSymbol = methodSymbol->getResolvedMethodSymbol();
if (resolvedMethodSymbol)
// The receiver class has to be initialized at this point. Otherwise updateCHTable might
// not have been called to update overridden bits
if (resolvedMethodSymbol && TR::Compiler->cls.isClassInitialized(vp->comp(), thisType))
{
TR_ResolvedMethod *originalResolvedMethod = resolvedMethodSymbol->getResolvedMethod();
TR_OpaqueClassBlock *originalMethodClass = originalResolvedMethod->classOfMethod();
Expand Down

0 comments on commit 15d8a0a

Please sign in to comment.