From: Michael Letterle Date: Fri, 31 Mar 2017 15:32:32 +0000 (-0400) Subject: Do not throw an assertion on no mscorlib X-Git-Tag: submit/tizen/20210909.063632~11030^2~7226 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3a3ea4b9ee15019dd8c3c84dd31c957351cd29e;p=platform%2Fupstream%2Fdotnet%2Fruntime.git 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 --- 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);