Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert failure when building runtime: Synthesized attribute constructor missing #75032

Closed
333fred opened this issue Sep 9, 2024 · 3 comments · Fixed by #75099
Closed

Assert failure when building runtime: Synthesized attribute constructor missing #75032

333fred opened this issue Sep 9, 2024 · 3 comments · Fixed by #75099
Assignees
Labels
4 - In Review A fix for the issue is submitted for review. Area-Compilers Bug
Milestone

Comments

@333fred
Copy link
Member

333fred commented Sep 9, 2024

Version Used: 9cf652f

Happens when building the src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj project. From the stack, the DefaultMemberAttribute constructor is not present, and we expect it to be.

/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error : Process terminated. Assertion failed. [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.CSharpCompilation.TrySynthesizeAttribute(WellKnownMember constructor, ImmutableArray`1 arguments, ImmutableArray`1 namedArguments, Boolean isOptionalUse) in /workspaces/roslyn/src/Compilers/CSharp/Portable/Symbols/Compilation_WellKnownMembers.cs:line 399 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.Symbols.SourceNamedTypeSymbol.AddSynthesizedAttributes(PEModuleBuilder moduleBuilder, ArrayBuilder`1& attributes) in /workspaces/roslyn/src/Compilers/CSharp/Portable/Symbols/Source/SourceNamedTypeSymbol.cs:line 1714 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.Symbol.GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder, Boolean emittingAssemblyAttributesInNetModule) in /workspaces/roslyn/src/Compilers/CSharp/Portable/Emitter/Model/SymbolAdapter.cs:line 100 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.Symbol.GetCustomAttributesToEmit(PEModuleBuilder moduleBuilder) in /workspaces/roslyn/src/Compilers/CSharp/Portable/Emitter/Model/SymbolAdapter.cs:line 89 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.SymbolAdapter.Microsoft.Cci.IReference.GetAttributes(EmitContext context) in /workspaces/roslyn/src/Compilers/CSharp/Portable/Emitter/Model/SymbolAdapter.cs:line 43 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.Cci.ReferenceIndexerBase.VisitTypeDefinitionNoMembers(ITypeDefinition typeDefinition) in /workspaces/roslyn/src/Compilers/Core/Portable/PEWriter/ReferenceIndexerBase.cs:line 273 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.Cci.ReferenceIndexerBase.Visit(ITypeDefinition typeDefinition) in /workspaces/roslyn/src/Compilers/Core/Portable/PEWriter/ReferenceIndexerBase.cs:line 299 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.Cci.MetadataVisitor.Visit(IEnumerable`1 types) in /workspaces/roslyn/src/Compilers/Core/Portable/PEWriter/MetadataVisitor.cs:line 379 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.Cci.ReferenceIndexer.Visit(CommonPEModuleBuilder module) in /workspaces/roslyn/src/Compilers/Core/Portable/PEWriter/ReferenceIndexer.cs:line 35 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.Cci.MetadataWriter.CreateIndices() in /workspaces/roslyn/src/Compilers/Core/Portable/PEWriter/MetadataWriter.cs:line 483 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.Cci.MetadataWriter.BuildMetadataAndIL(PdbWriter nativePdbWriterOpt, BlobBuilder ilBuilder, PooledBlobBuilder& mappedFieldDataBuilder, PooledBlobBuilder& managedResourceDataBuilder, Blob& mvidFixup, Blob& mvidStringFixup) in /workspaces/roslyn/src/Compilers/Core/Portable/PEWriter/MetadataWriter.cs:line 1779 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.Cci.PeWriter.WritePeToStream(EmitContext context, CommonMessageProvider messageProvider, Func`1 getPeStream, Func`1 getPortablePdbStreamOpt, PdbWriter nativePdbWriterOpt, String pdbPathOpt, Boolean metadataOnly, Boolean isDeterministic, Boolean emitTestCoverageData, Nullable`1 privateKeyOpt, CancellationToken cancellationToken) in /workspaces/roslyn/src/Compilers/Core/Portable/PEWriter/PeWriter.cs:line 111 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.Compilation.SerializePeToStream(CommonPEModuleBuilder moduleBeingBuilt, DiagnosticBag metadataDiagnostics, CommonMessageProvider messageProvider, Func`1 getPeStream, Func`1 getMetadataPeStreamOpt, Func`1 getPortablePdbStreamOpt, PdbWriter nativePdbWriterOpt, String pdbPathOpt, RebuildData rebuildData, Boolean metadataOnly, Boolean includePrivateMembers, Boolean isDeterministic, Boolean emitTestCoverageData, Nullable`1 privateKeyOpt, CancellationToken cancellationToken) in /workspaces/roslyn/src/Compilers/Core/Portable/Compilation/Compilation.cs:line 3361 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.Compilation.SerializeToPeStream(CommonPEModuleBuilder moduleBeingBuilt, EmitStreamProvider peStreamProvider, EmitStreamProvider metadataPEStreamProvider, EmitStreamProvider pdbStreamProvider, RebuildData rebuildData, Func`2 testSymWriterFactory, DiagnosticBag diagnostics, EmitOptions emitOptions, Nullable`1 privateKeyOpt, CancellationToken cancellationToken) in /workspaces/roslyn/src/Compilers/Core/Portable/Compilation/Compilation.cs:line 3260 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CommonCompiler.CompileAndEmit(TouchedFileLogger touchedFilesLogger, Compilation& compilation, ImmutableArray`1 analyzers, ImmutableArray`1 generators, ImmutableArray`1 additionalTextFiles, AnalyzerConfigSet analyzerConfigSet, ImmutableArray`1 sourceFileAnalyzerConfigOptions, ImmutableArray`1 embeddedTexts, DiagnosticBag diagnostics, ErrorLogger errorLogger, CancellationToken cancellationToken, CancellationTokenSource& analyzerCts, AnalyzerDriver& analyzerDriver, Nullable`1& generatorTimingInfo) in /workspaces/roslyn/src/Compilers/Core/Portable/CommandLine/CommonCompiler.cs:line 1445 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CommonCompiler.RunCore(TextWriter consoleOutput, ErrorLogger errorLogger, CancellationToken cancellationToken) in /workspaces/roslyn/src/Compilers/Core/Portable/CommandLine/CommonCompiler.cs:line 956 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CommonCompiler.Run(TextWriter consoleOutput, CancellationToken cancellationToken) in /workspaces/roslyn/src/Compilers/Core/Portable/CommandLine/CommonCompiler.cs:line 781 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.<>c__DisplayClass1_0.<Run>b__0(TextWriter tw) in /workspaces/roslyn/src/Compilers/Shared/Csc.cs:line 28 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CommandLine.ConsoleUtil.RunWithUtf8Output[T](Boolean utf8Output, TextWriter textWriter, Func`2 func) in /workspaces/roslyn/src/Compilers/Core/CommandLine/ConsoleUtil.cs:line 53 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.CommandLine.Csc.Run(String[] args, BuildPaths buildPaths, TextWriter textWriter, IAnalyzerAssemblyLoader analyzerLoader) in /workspaces/roslyn/src/Compilers/Shared/Csc.cs:line 28 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunLocalCompilation(String[] arguments, BuildPaths buildPaths, TextWriter textWriter) in /workspaces/roslyn/src/Compilers/Shared/BuildClient.cs:line 196 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CommandLine.BuildClient.RunCompilation(IEnumerable`1 originalArguments, BuildPaths buildPaths, TextWriter textWriter, String pipeName) in /workspaces/roslyn/src/Compilers/Shared/BuildClient.cs:line 167 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CommandLine.BuildClient.Run(IEnumerable`1 arguments, RequestLanguage language, CompileFunc compileFunc, CompileOnServerFunc compileOnServerFunc, ICompilerServerLogger logger) in /workspaces/roslyn/src/Compilers/Shared/BuildClient.cs:line 117 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.MainCore(String[] args) in /workspaces/roslyn/src/Compilers/CSharp/csc/Program.cs:line 37 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
/home/vscode/.nuget/packages/microsoft.net.compilers.toolset/4.12.0-dev/tasks/netcore/Microsoft.CSharp.Core.targets(89,5): error :    at Microsoft.CodeAnalysis.CSharp.CommandLine.Program.Main(String[] args) in /workspaces/roslyn/src/Compilers/CSharp/csc/Program.cs:line 18 [/workspaces/runtime/src/coreclr/nativeaot/Test.CoreLib/src/Test.CoreLib.csproj]
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Sep 9, 2024
@333fred
Copy link
Member Author

333fred commented Sep 9, 2024

Here's the complog: Build.zip. Just rename back to Build.complog after downloading. Failing project is Test.CoreLib

@jaredpar jaredpar added Bug and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Sep 9, 2024
@jaredpar jaredpar added this to the 17.12 milestone Sep 9, 2024
@333fred 333fred changed the title Assert failure when building runtime Assert failure when building runtime: Synthesized attribute constructor missing Sep 9, 2024
AlekseyTs added a commit to AlekseyTs/roslyn that referenced this issue Sep 12, 2024
@AlekseyTs AlekseyTs added the 4 - In Review A fix for the issue is submitted for review. label Sep 12, 2024
@333fred
Copy link
Member Author

333fred commented Sep 30, 2024

@agocke y'all will need to include this attribute in the test project when you take your next compiler update.

@agocke
Copy link
Member

agocke commented Sep 30, 2024

Done: dotnet/runtime#108236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - In Review A fix for the issue is submitted for review. Area-Compilers Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants