From d3a3ea4b9ee15019dd8c3c84dd31c957351cd29e Mon Sep 17 00:00:00 2001 From: Michael Letterle Date: Fri, 31 Mar 2017 11:32:32 -0400 Subject: [PATCH] Do not throw an assertion on no mscorlib It's okay to use debuggable attributes from other BaseAsmRef's Fixes dotnet/coreclr#10608 Commit migrated from https://github.com/dotnet/coreclr/commit/80f4485197c62b13fa6cbaaab06a2c184e5ed316 --- src/coreclr/src/ilasm/asmman.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/coreclr/src/ilasm/asmman.cpp b/src/coreclr/src/ilasm/asmman.cpp index 0f0d1cf..22e780f 100644 --- a/src/coreclr/src/ilasm/asmman.cpp +++ b/src/coreclr/src/ilasm/asmman.cpp @@ -297,9 +297,10 @@ void AsmMan::EmitDebuggableAttribute(mdToken tkOwner) else { AsmManAssembly *pAssembly = GetAsmRefByName("mscorlib"); - _ASSERTE(pAssembly != NULL); - PREFIX_ASSUME(pAssembly != NULL); - fOldStyle = (pAssembly->usVerMajor == 1); + if(pAssembly != NULL) + { + fOldStyle = (pAssembly->usVerMajor == 1); + } } bsBytes->appendInt8(1); -- 2.7.4