Skip to content

Commit

Permalink
Merge pull request #4864 from aviansie-ben/issue-4751
Browse files Browse the repository at this point in the history
Fix crash in AOT during field iteration
  • Loading branch information
Irwin D'Souza authored Feb 25, 2019
2 parents c2116cb + 907f7ea commit 9d606fc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion runtime/compiler/env/j9fieldsInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,17 @@ TR_VMFieldsInfo::TR_VMFieldsInfo(TR::Compilation * comp, J9Class *aClazz, int bu
for (i=numSupClasses-1; i>=0; i--)
{
supClass = (J9Class*)comp->fej9()->getSuperClass((TR_OpaqueClassBlock*)supClass);
TR_ASSERT(supClass, "Found NULL supClass in inheritance chain");

if (comp->compileRelocatableCode())
{
if (!supClass)
comp->failCompilation<J9::AOTNoSupportForAOTFailure>("Found NULL supClass in inheritance chain");
}
else
{
TR_ASSERT_FATAL(supClass, "Found NULL supClass in inheritance chain");
}

romCl = supClass->romClass;

// iterate through the fields creating TR_VMField and inserting them into a List
Expand Down

0 comments on commit 9d606fc

Please sign in to comment.