-
Notifications
You must be signed in to change notification settings - Fork 4.2k
CompileExpressionTests.SequencePointsMultipleDocuments failing #66260
Description
Unit test CompileExpressionTests.SequencePointsMultipleDocuments fails occasionally in the call to ISymEncUnmanagedMethod.GetDocumentsForMethod().
Also reported as AB#1715284
To repro, run the SequencePointsMultipleDocuments test in a loop 100 times.
In some cases, the call to ISymEncUnmanagedMethod.GetDocumentsForMethod() fails with:
System.InvalidOperationException
HResult=0x80131509
Message=Read only 1 of 2 items.
Source=Microsoft.DiaSymReader
StackTrace:
at Microsoft.DiaSymReader.InteropUtilities.ValidateItems(Int32 actualCount, Int32 bufferLength)
at Microsoft.DiaSymReader.InteropUtilities.GetItems[TEntity,TItem](TEntity entity, CountGetter1 countGetter, ItemsGetter2 itemsGetter)
at Microsoft.DiaSymReader.SymUnmanagedExtensions.GetDocumentsForMethod(ISymUnmanagedMethod method)
at Microsoft.CodeAnalysis.ExpressionEvaluator.MethodDebugInfo2.ReadMethodDebugInfo(ISymUnmanagedReader3 symReader, EESymbolProvider2 symbolProvider, Int32 methodToken, Int32 methodVersion, Int32 ilOffset, Boolean isVisualBasicMethod) in C:\dotnet\roslyn\src\ExpressionEvaluator\Core\Source\ExpressionCompiler\PDB\MethodDebugInfo.Native.cs:line 178
As a result, the test fails with: error CS0103: The name 'z' does not exist in the current context
This issue is mentioned in test.