From 2f6259ceaa9284cfba941faa6f6d0a48fc7c4ef9 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: Tue, 22 Feb 2022 22:10:04 +0300 Subject: [PATCH] Fix for number of used frame infos during crossgen2 compilation jitNativeCode might retry itself when exception happens inside jit, but reserveUnwindInfo might be already called at this point, so _numFrameInfos should be cleaned up. --- src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs index cd464db7955341..89a5f0c6c52a85 100644 --- a/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs +++ b/src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs @@ -3430,6 +3430,7 @@ private void reportFatalError(CorJitResult result) { // We could add some logging here, but for now it's unnecessary. // CompileMethod is going to fail with this CorJitResult anyway. + _numFrameInfos = 0; } private void recordCallSite(uint instrOffset, CORINFO_SIG_INFO* callSig, CORINFO_METHOD_STRUCT_* methodHandle)