Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Insert int3 after non-returning calls at the end of basic blocks. #17535

Merged
merged 1 commit into from
Apr 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/jit/codegenlinear.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,22 @@ void CodeGen::genCodeForBBlist()
{
instGen(INS_BREAKPOINT); // This should never get executed
}
// Do likewise for blocks that end in DOES_NOT_RETURN calls
// that were not caught by the above rules. This ensures that
// gc register liveness doesn't change across call instructions
// in fully-interruptible mode.
else
{
GenTree* call = block->lastNode();

if ((call != nullptr) && (call->gtOper == GT_CALL))
{
if ((call->gtCall.gtCallMoreFlags & GTF_CALL_M_DOES_NOT_RETURN) != 0)
{
instGen(INS_BREAKPOINT); // This should never get executed
}
}
}

break;

Expand Down