Skip to content

Commit 61a7594

Browse files
committed
Fix backwardpass assert and sccliveness crashes
Inlined instruction can get hoisted out of an inliner loop. This caused MarkScopeObjSymUseForStackArgOpt() to added bytecodeUses for the inlinee's scope object outside the scope of the inlinee, which was wrong. Changed the code to ignore instrs inside the landingPad block. VSO bug: 21627404, 19979778 and 20850710
1 parent 6f09895 commit 61a7594

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Backend/BackwardPass.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,11 @@ void
309309
BackwardPass::MarkScopeObjSymUseForStackArgOpt()
310310
{
311311
IR::Instr * instr = this->currentInstr;
312+
BasicBlock *block = this->currentBlock;
313+
312314
if (tag == Js::DeadStorePhase)
313315
{
314-
if (instr->DoStackArgsOpt() && instr->m_func->GetScopeObjSym() != nullptr && this->DoByteCodeUpwardExposedUsed())
316+
if (instr->DoStackArgsOpt() && !block->IsLandingPad() && instr->m_func->GetScopeObjSym() != nullptr && this->DoByteCodeUpwardExposedUsed())
315317
{
316318
this->currentBlock->byteCodeUpwardExposedUsed->Set(instr->m_func->GetScopeObjSym()->m_id);
317319
}

0 commit comments

Comments
 (0)