From aed7321acee36a5a1237da46d1814e9c521dde61 Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 15 Dec 2021 12:58:38 -0800 Subject: [PATCH] Allow empty IGs --- src/coreclr/jit/unwindarm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreclr/jit/unwindarm.cpp b/src/coreclr/jit/unwindarm.cpp index 54c6a011cb0a70..dca139571dc730 100644 --- a/src/coreclr/jit/unwindarm.cpp +++ b/src/coreclr/jit/unwindarm.cpp @@ -1628,7 +1628,8 @@ void UnwindFragmentInfo::Allocate( endOffset = ufiNext->GetStartOffset(); } - assert(endOffset > startOffset); + // Either we have valid codeSize or the IG is empty. + assert((endOffset > startOffset) || (this->ufiEmitLoc->GetIG()->igSize == 0)); codeSize = endOffset - startOffset; // Finalize the fragment unwind block to hand to the VM