Fix assert in portable pdb reader running the clrstack command (dotnet/coreclr#10011)
authorMike McLaughlin <mikem@microsoft.com>
Wed, 8 Mar 2017 08:29:50 +0000 (00:29 -0800)
committerJan Kotas <jkotas@microsoft.com>
Wed, 8 Mar 2017 08:29:50 +0000 (00:29 -0800)
Issue dotnet/coreclr#9969

Commit migrated from https://github.com/dotnet/coreclr/commit/292770c5a5782425ab742b2739521eefc89fc725

src/coreclr/src/ToolBox/SOS/NETCore/SymbolReader.cs

index 492f7cb..50a8ded 100644 (file)
@@ -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();