You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix region asserts for Leaves converted to Br in non exception finally region
Mark Leaves converted to Br in non excpetion finally region with m_leaveConvToBr bit on BranchInstr in DBG builds,
so that FlowGraph::Destroy asserts correctly for such branches
if (region->GetType() == RegionTypeCatch && region != predRegion)
1730
+
if (predBlock->GetLastInstr()->AsBranchInstr()->m_leaveConvToBr)
1731
+
{
1732
+
// Leave converted to Br in finally region
1733
+
AssertMsg(region == predRegion->GetParent(), "Bad region prop in finally");
1734
+
}
1735
+
elseif (region->GetType() == RegionTypeCatch && region != predRegion)
1728
1736
{
1729
1737
AssertMsg(predRegion->GetType() == RegionTypeTry, "Bad region type for the try");
1730
1738
}
1731
1739
elseif (region->GetType() == RegionTypeFinally && region != predRegion)
1732
1740
{
1733
-
// When we add edge from finally to early exit, and break block removal moves the edge into finally region, we can end up with an edge between finally and non eh region
1741
+
AssertMsg(predRegion->GetType() == RegionTypeTry, "Bad region type for the try");
1734
1742
}
1735
1743
else
1736
1744
{
1737
-
// Leave's within non excepting finallys that are not early exit edges are converted to br
1738
-
AssertMsg((predRegion->IsNonExceptingFinally() && region == predRegion->GetParent()) || region == predRegion, "Bad region propagation through interior block");
1745
+
AssertMsg(region == predRegion, "Bad region propagation through interior block");
0 commit comments