From fbcc6dcc6cbc270bad57ff39fb482c09a7fecf54 Mon Sep 17 00:00:00 2001 From: Pat Gavlin Date: Wed, 26 Apr 2017 13:23:59 -0700 Subject: [PATCH] Require a frame pointer in methods with throw blocks for sources that have mismatched stack depths. This requirement effectively disables double-aligned frames (which are effectively a special case of ESP frames). Without this change it is possible for the JIT to generate a throw block with sources that have mismatched offsets, which can lead to GC holes. Fixes VSO 424019. Commit migrated from https://github.com/dotnet/coreclr/commit/93db790df78e34a496c8a4ecc985289e680b9958 --- src/coreclr/src/jit/flowgraph.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/src/jit/flowgraph.cpp b/src/coreclr/src/jit/flowgraph.cpp index 0307ef8..71e9f66 100644 --- a/src/coreclr/src/jit/flowgraph.cpp +++ b/src/coreclr/src/jit/flowgraph.cpp @@ -17733,10 +17733,12 @@ BasicBlock* Compiler::fgAddCodeRef(BasicBlock* srcBlk, unsigned refData, Special #if defined(UNIX_X86_ABI) codeGen->setFrameRequired(true); + codeGen->setFramePointerRequiredGCInfo(true); #else // !defined(UNIX_X86_ABI) if (add->acdStkLvl != stkDepth) { codeGen->setFrameRequired(true); + codeGen->setFramePointerRequiredGCInfo(true); } #endif // !defined(UNIX_X86_ABI) #endif // _TARGET_X86_ -- 2.7.4