transplant game engine fix for memory safety issues in normalization into OSS changes

This commit is contained in:
Vighnesh 2024-04-05 13:27:37 -07:00
parent 0f1973954c
commit 5aa6d99340

View File

@ -2631,6 +2631,9 @@ struct TypeChecker2
for (const auto& [ty, _negations] : norm->classes.classes)
{
fetch(ty);
if (!normValid)
break;
}
}
@ -2644,9 +2647,16 @@ struct TypeChecker2
fetch(builtinTypes->stringType);
if (normValid)
fetch(norm->threads);
for (TypeId ty : norm->tables)
if (normValid)
if (normValid)
{
for (TypeId ty : norm->tables)
{
fetch(ty);
if (!normValid)
break;
}
}
if (normValid && norm->functions.isTop)
fetch(builtinTypes->functionType);
else if (normValid && !norm->functions.isNever())
@ -2672,6 +2682,9 @@ struct TypeChecker2
}
else
fetch(tyvar);
if (!normValid)
break;
}
}