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

[NativeAOT/ARM] Assert failure in PutThumb2BlRel24 #97750

Closed
Tracked by #97729
filipnavara opened this issue Jan 31, 2024 · 3 comments · Fixed by #97756
Closed
Tracked by #97729

[NativeAOT/ARM] Assert failure in PutThumb2BlRel24 #97750

filipnavara opened this issue Jan 31, 2024 · 3 comments · Fixed by #97756

Comments

@filipnavara
Copy link
Member

Crashes when compiling System.Net.Quic.Functional.Tests library tests:

[/home/navara/runtime/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Functional.Tests.csproj::TargetFramework=net9.0-linux]
  Process terminated. Assertion failed.
     at ILCompiler.DependencyAnalysis.Relocation.PutThumb2BlRel24(UInt16* p, Int32 imm24) in /home/navara/runtime/src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs:line 177
     at ILCompiler.DependencyAnalysis.Relocation.WriteValue(RelocType relocType, Void* location, Int64 value) in /home/navara/runtime/src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs:line 499
     at ILCompiler.ObjectWriter.ObjectWriter.EmitOrResolveRelocation(Int32 sectionIndex, Int64 offset, Span`1 data, RelocType relocType, String symbolName, Int64 addend) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/ObjectWriter.cs:line 185
     at ILCompiler.ObjectWriter.ObjectWriter.EmitObject(String objectFilePath, IReadOnlyCollection`1 nodes, IObjectDumper dumper, Logger logger) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/ObjectWriter.cs:line 443
     at ILCompiler.ObjectWriter.ObjectWriter.EmitObject(String objectFilePath, IReadOnlyCollection`1 nodes, NodeFactory factory, ObjectWritingOptions options, IObjectDumper dumper, Logger logger) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/ObjectWriter.cs:line 533
     at ILCompiler.RyuJitCompilation.CompileInternal(String outputFile, ObjectDumper dumper) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/RyuJitCompilation.cs:line 111
     at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs:line 528
     at ILCompiler.Program.Run() in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 585
     at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass236_0.<.ctor>b__0(ParseResult result) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs:line 292
     at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
     at System.CommandLine.ParseResult.Invoke()
     at ILCompiler.Program.Main(String[] args) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 753
  Aborted
/home/navara/runtime/artifacts/bin/coreclr/linux.arm.Debug/build/Microsoft.NETCore.Native.targets(310,5): error MSB3073: The command ""/home/navara/runtime/artifacts/bin/coreclr/linux.arm.Debug/x64/ilc/ilc" @"/home/navara/runtime/artifacts/obj/System.Net.Http.Functional.Tests/Debug/net9.0-linux/native/System.Net.Http.Functional.Tests.ilc.rsp"" exited with code 134. 
@ghost
Copy link

ghost commented Jan 31, 2024

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Crashes when compiling System.Net.Quic.Functional.Tests library tests:

[/home/navara/runtime/src/libraries/System.Net.Quic/tests/FunctionalTests/System.Net.Quic.Functional.Tests.csproj::TargetFramework=net9.0-linux]
  Process terminated. Assertion failed.
     at ILCompiler.DependencyAnalysis.Relocation.PutThumb2BlRel24(UInt16* p, Int32 imm24) in /home/navara/runtime/src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs:line 177
     at ILCompiler.DependencyAnalysis.Relocation.WriteValue(RelocType relocType, Void* location, Int64 value) in /home/navara/runtime/src/coreclr/tools/Common/Compiler/DependencyAnalysis/Relocation.cs:line 499
     at ILCompiler.ObjectWriter.ObjectWriter.EmitOrResolveRelocation(Int32 sectionIndex, Int64 offset, Span`1 data, RelocType relocType, String symbolName, Int64 addend) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/ObjectWriter.cs:line 185
     at ILCompiler.ObjectWriter.ObjectWriter.EmitObject(String objectFilePath, IReadOnlyCollection`1 nodes, IObjectDumper dumper, Logger logger) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/ObjectWriter.cs:line 443
     at ILCompiler.ObjectWriter.ObjectWriter.EmitObject(String objectFilePath, IReadOnlyCollection`1 nodes, NodeFactory factory, ObjectWritingOptions options, IObjectDumper dumper, Logger logger) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ObjectWriter/ObjectWriter.cs:line 533
     at ILCompiler.RyuJitCompilation.CompileInternal(String outputFile, ObjectDumper dumper) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.RyuJit/Compiler/RyuJitCompilation.cs:line 111
     at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Compilation.cs:line 528
     at ILCompiler.Program.Run() in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 585
     at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass236_0.<.ctor>b__0(ParseResult result) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs:line 292
     at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
     at System.CommandLine.ParseResult.Invoke()
     at ILCompiler.Program.Main(String[] args) in /home/navara/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 753
  Aborted
/home/navara/runtime/artifacts/bin/coreclr/linux.arm.Debug/build/Microsoft.NETCore.Native.targets(310,5): error MSB3073: The command ""/home/navara/runtime/artifacts/bin/coreclr/linux.arm.Debug/x64/ilc/ilc" @"/home/navara/runtime/artifacts/obj/System.Net.Http.Functional.Tests/Debug/net9.0-linux/native/System.Net.Http.Functional.Tests.ilc.rsp"" exited with code 134. 
Author: filipnavara
Assignees: -
Labels:

arch-arm32, area-NativeAOT-coreclr

Milestone: -

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jan 31, 2024
@filipnavara
Copy link
Member Author

The relative offset to System.Threading.Interlocked__CompareExchange_3<System___Canon> is indeed outside of the 24-bit range (0x12DF9A0).

@filipnavara
Copy link
Member Author

Seems like passing the relocation to the linker and letting it generate a thunk may work.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jan 31, 2024
@agocke agocke added this to the Future milestone Feb 1, 2024
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Feb 1, 2024
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants