Skip to content

Test failure: LibraryImportGenerator.UnitTests.NativeMarshallingAttributeAnalyzerTests.MarshallerWithNoEntryPointAttributes_ReportsDiagnostic #110136

@v-wenyuxu

Description

@v-wenyuxu

Failed in: runtime-coreclr libraries-pgo 20241124.1

Failed tests:

net10.0-windows-Release-x86-fullpgo_methodprofiling-Windows.10.Amd64.Open
    - LibraryImportGenerator.UnitTests.NativeMarshallingAttributeAnalyzerTests.MarshallerWithNoEntryPointAttributes_ReportsDiagnostic
    - ComInterfaceGenerator.Unit.Tests.CompileFails.VerifyNonPartialInterfaceWarns
net10.0-windows-Release-x86-fullpgo-Windows.10.Amd64.Open
    - LibraryImportGenerator.UnitTests.ShapeBreakingDiagnosticSuppressorTests.StatefulValueMarshallerMethodsThatDoNotUseInstanceState_SuppressesDiagnostic
    - LibraryImportGenerator.UnitTests.ShapeBreakingDiagnosticSuppressorTests.MethodWithShapeMatchingNameButDifferingSignature_DoesNotSuppressDiagnostic
    - LibraryImportGenerator.UnitTests.ShapeBreakingDiagnosticSuppressorTests.StatefulValueMarshallerMethodsForMarshallerInNonNestedMarshaller_DoesNotSuppressDiagnostics
    - LibraryImportGenerator.UnitTests.ShapeBreakingDiagnosticSuppressorTests.StatefulLinearCollectionMarshallerMethodsThatDoNotUseInstanceState_SuppressesDiagnostic
    - LibraryImportGenerator.UnitTests.CustomMarshallerAttributeAnalyzerTests_AttributeUsage.NullManagedType_ReportsDiagnostic
    - LibraryImportGenerator.UnitTests.CustomMarshallerAttributeAnalyzerTests_AttributeUsage.UsingMarshalModeAsFlags_ReportsDiagnostic
    - LibraryImportGenerator.UnitTests.CustomMarshallerAttributeAnalyzerTests_AttributeUsage.UsingInvalidMarshalMode_ReportsDiagnostic
    - ComInterfaceGenerator.Unit.Tests.CompileFails.VerifyNonPartialInterfaceWarns
net10.0-windows-Release-x86-syntheticpgo_blend-Windows.10.Amd64.Open
    - ComInterfaceGenerator.Unit.Tests.CompileFails.VerifyNonPartialInterfaceWarns
    - ComInterfaceGenerator.Unit.Tests.ConvertToGeneratedComInterfaceTests.Empty_ReportsDiagnostic
    - ComInterfaceGenerator.Unit.Tests.ConvertToGeneratedComInterfaceTests.UnsupportedInterfaceTypes_DoesNotReportDiagnostic
    - ComInterfaceGenerator.Unit.Tests.AddGeneratedComClassTests.TypeThatDoesNotImplementGeneratedComInterfaceType_DoesNotReportDiagnostic
    - ComInterfaceGenerator.Unit.Tests.AddGeneratedComClassTests.TypeThatImplementsGeneratedComInterfaceTypeTranstively_ReportsDiagnostic
    - ComInterfaceGenerator.Unit.Tests.AddGeneratedComClassTests.TypeThatImplementsGeneratedComInterfaceType_ReportsDiagnostic
net10.0-windows-Release-x86-fullpgo_random_gdv-Windows.10.Amd64.Open
    - ComInterfaceGenerator.Unit.Tests.CompileFails.VerifyNonPartialInterfaceWarns
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.GetComObjectData
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.GetObjectForIUnknown_ReportsDiagnostic
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.GetTypedObjectForIUnknown
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.GetObjectForIUnknown
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.CreateAggregatedObject
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.GetIUnknownForObject
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.CastsBetweenComImportAndGeneratedComTypes
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.ReleaseComObject
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.SetNullToComImportField
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.GetComInterfaceForObject
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.SetComObjectData
    - ComInterfaceGenerator.Unit.Tests.RuntimeComApiUsageWithSourceGeneratedComTests.FinalReleaseComObject

Error message:

 System.AggregateException : One or more errors occurred. (Index was outside the bounds of the array.)
---- System.IndexOutOfRangeException : Index was outside the bounds of the array.

Stack trace:

   at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure) in /_/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/TaskReplicator.cs:line 158
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) in /_/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.cs:line 982
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException) in /_/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.cs:line 2848
   at System.Threading.Tasks.Parallel.ForWorker[TLocal,TInt](TInt fromInclusive, TInt toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) in /_/src/libraries/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/Parallel.cs:line 1131
   at Roslyn.Utilities.RoslynParallel.For(Int32 fromInclusive, Int32 toExclusive, Action`1 body, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamespaceSymbol.ForceComplete(SourceLocation locationOpt, Predicate`1 filter, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceModuleSymbol.ForceComplete(SourceLocation locationOpt, Predicate`1 filter, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.Symbols.SourceAssemblySymbol.ForceComplete(SourceLocation locationOpt, Predicate`1 filter, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetSourceDeclarationDiagnostics(SyntaxTree syntaxTree, Nullable`1 filterSpanWithinTree, Func`4 locationFilterOpt, Predicate`1 symbolFilter, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnosticsWithoutSeverityFiltering(CompilationStage stage, Boolean includeEarlierStages, BindingDiagnosticBag builder, Predicate`1 symbolFilter, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnostics(CompilationStage stage, Boolean includeEarlierStages, DiagnosticBag diagnostics, Predicate`1 symbolFilter, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnostics(CompilationStage stage, Boolean includeEarlierStages, Predicate`1 symbolFilter, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.GetDiagnostics(CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.<GetSortedDiagnosticsAsync>g__GetCompilerDiagnosticsAsync|81_0(AnalyzerTest`1 self, Compilation compilation, ImmutableArray`1 analyzers, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 1152
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.GetSortedDiagnosticsAsync(Solution solution, ImmutableArray`1 analyzers, ImmutableArray`1 additionalDiagnostics, CompilerDiagnostics compilerDiagnostics, IVerifier verifier, CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 1122
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.GetSortedDiagnosticsAsync(EvaluatedProjectState primaryProject, ImmutableArray`1 additionalProjects, ImmutableArray`1 analyzers, IVerifier verifier, CancellationToken cancellationToken) in /_/src/Microsoft.CodeAnalysis.Testing/Microsoft.CodeAnalysis.Analyzer.Testing/AnalyzerTest`1.cs:line 1090
   at Microsoft.CodeAnalysis.Testing.AnalyzerTest`1.VerifyDiagnosticsAsync(E

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions