We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba280ba commit 1314892Copy full SHA for 1314892
src/coreclr/jit/async.cpp
@@ -1709,6 +1709,14 @@ void AsyncTransformation::CreateCheckAndSuspendAfterCall(BasicBlock*
1709
*remainder = m_comp->fgSplitBlockAfterNode(block, jtrue);
1710
JITDUMP(" Remainder is " FMT_BB "\n", (*remainder)->bbNum);
1711
1712
+ // HACK: Not sure why it can happen, but we may see the end IL for the block.
1713
+ // This is just to avoid asserts later on.
1714
+ // This is not a real fix.
1715
+ if (block->bbCodeOffsEnd > (*remainder)->bbCodeOffs)
1716
+ {
1717
+ block->bbCodeOffsEnd = (*remainder)->bbCodeOffs;
1718
+ }
1719
+
1720
FlowEdge* retBBEdge = m_comp->fgAddRefPred(suspendBB, block);
1721
block->SetCond(retBBEdge, block->GetTargetEdge());
1722
0 commit comments