From 7c52d4b1be625f52fe1bb64c5f6694fe53306ec9 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Wed, 8 Mar 2017 00:29:50 -0800 Subject: [PATCH] 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 --- src/coreclr/src/ToolBox/SOS/NETCore/SymbolReader.cs | 3 +++ 1 file changed, 3 insertions(+) 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(); -- 2.7.4