From: Mike McLaughlin Date: Wed, 8 Mar 2017 08:29:50 +0000 (-0800) Subject: Fix assert in portable pdb reader running the clrstack command (dotnet/coreclr#10011) X-Git-Tag: submit/tizen/20210909.063632~11030^2~7809 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c52d4b1be625f52fe1bb64c5f6694fe53306ec9;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix assert in portable pdb reader running the clrstack command (dotnet/coreclr#10011) Issue dotnet/coreclr#9969 Commit migrated from https://github.com/dotnet/coreclr/commit/292770c5a5782425ab742b2739521eefc89fc725 --- diff --git a/src/coreclr/src/ToolBox/SOS/NETCore/SymbolReader.cs b/src/coreclr/src/ToolBox/SOS/NETCore/SymbolReader.cs index 492f7cb..50a8ded 100644 --- a/src/coreclr/src/ToolBox/SOS/NETCore/SymbolReader.cs +++ b/src/coreclr/src/ToolBox/SOS/NETCore/SymbolReader.cs @@ -296,6 +296,9 @@ namespace SOS return false; MethodDebugInformationHandle methodDebugHandle = ((MethodDefinitionHandle)handle).ToDebugInformationHandle(); + if (methodDebugHandle.IsNil) + return false; + MethodDebugInformation methodDebugInfo = reader.GetMethodDebugInformation(methodDebugHandle); SequencePointCollection sequencePoints = methodDebugInfo.GetSequencePoints();