From 796ab9c382bcfefe5325d8b615bce5ca9505e6e9 Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Tue, 3 Jul 2018 23:12:54 -0700 Subject: [PATCH] compGSReorderStackLayout is not supported when EnC is on (dotnet/coreclr#18713) Commit migrated from https://github.com/dotnet/coreclr/commit/2ce3f25984f5110b1821d895dc99119501e19f52 --- src/coreclr/src/jit/importer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp index 3837a96..3ed4268 100644 --- a/src/coreclr/src/jit/importer.cpp +++ b/src/coreclr/src/jit/importer.cpp @@ -14381,10 +14381,13 @@ void Compiler::impImportBlockCode(BasicBlock* block) op1 = gtNewOperNode(GT_ADDR, TYP_I_IMPL, op1); convertedToLocal = true; - // Ensure we have stack security for this method. - // Reorder layout since the converted localloc is treated as an unsafe buffer. - setNeedsGSSecurityCookie(); - compGSReorderStackLayout = true; + if (!this->opts.compDbgEnC) + { + // Ensure we have stack security for this method. + // Reorder layout since the converted localloc is treated as an unsafe buffer. + setNeedsGSSecurityCookie(); + compGSReorderStackLayout = true; + } } } } -- 2.7.4