Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/coreclr/jit/flowgraph.cpp')
-rw-r--r--src/coreclr/jit/flowgraph.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coreclr/jit/flowgraph.cpp b/src/coreclr/jit/flowgraph.cpp
index e7a281cdeca..04faed33f50 100644
--- a/src/coreclr/jit/flowgraph.cpp
+++ b/src/coreclr/jit/flowgraph.cpp
@@ -2603,8 +2603,8 @@ void Compiler::fgAddInternal()
noway_assert(!compIsForInlining());
// The backend requires a scratch BB into which it can safely insert a P/Invoke method prolog if one is
- // required. Create it here.
- if (compMethodRequiresPInvokeFrame())
+ // required. Similarly, we need a scratch BB for poisoning. Create it here.
+ if (compMethodRequiresPInvokeFrame() || compShouldPoisonFrame())
{
fgEnsureFirstBBisScratch();
fgFirstBB->bbFlags |= BBF_DONT_REMOVE;