Description
Description
ILC crashes on x64, works on arm64.
In other words, this works:
[...]/packages/runtime.osx-arm64.microsoft.dotnet.ilcompiler/9.0.0-preview.3.24157.12/tools/ilc" @"obj/Debug/net9.0-macos/osx-arm64/native/monotouchtest.ilc.rsp"
this does not:
[...]/packages/runtime.osx-x64.microsoft.dotnet.ilcompiler/9.0.0-preview.3.24157.12/tools/ilc" @"obj/Debug/net9.0-macos/osx-arm64/native/monotouchtest.ilc.rsp"
Reproduction Steps
Repro using --make-repro-path: 834971237_monotouchtest.zip
Expected behavior
Same behavior between arm64 and x64 (preferrably no crashes in either).
Actual behavior
Crash on x64: https://gist.github.com/rolfbjarne/bfa59a2999b165673b162e65e0c36d53
Thread 27 Crashed:
0 <translation info unavailable> 0x1048c5da0 ???
1 libsystem_platform.dylib 0x7ff805c7eff3 _sigtramp + 51
2 libclrjit_universal_arm64_x64.dylib 0x11b708c86 CodeGen::genCodeForCpObj(GenTreeBlk*) + 934
3 libclrjit_universal_arm64_x64.dylib 0x11b571d51 CodeGen::genCodeForBBlist() + 1745
4 libclrjit_universal_arm64_x64.dylib 0x11b56a725 CodeGen::genGenerateMachineCode() + 981
5 libclrjit_universal_arm64_x64.dylib 0x11b571422 CodeGenPhase::DoPhase() + 34
6 libclrjit_universal_arm64_x64.dylib 0x11b6aae38 Phase::Run() + 24
7 libclrjit_universal_arm64_x64.dylib 0x11b56a2bd CodeGen::genGenerateCode(void**, unsigned int*) + 109
8 libclrjit_universal_arm64_x64.dylib 0x11b578de2 Compiler::compCompile(void**, unsigned int*, JitFlags*) + 6482
9 libclrjit_universal_arm64_x64.dylib 0x11b57af01 Compiler::compCompileHelper(CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*) + 1425
10 libclrjit_universal_arm64_x64.dylib 0x11b57a228 Compiler::compCompile(CORINFO_MODULE_STRUCT_*, void**, unsigned int*, JitFlags*) + 1272
11 libclrjit_universal_arm64_x64.dylib 0x11b57baab jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*) + 539
12 libclrjit_universal_arm64_x64.dylib 0x11b57fd69 CILJit::compileMethod(ICorJitInfo*, CORINFO_METHOD_INFO*, unsigned int, unsigned char**, unsigned int*) + 121
Regression?
Yes, this started happening in a maestro bump (dotnet/macios#20249).
So looks like somewhere in this range: 5e603d5...8510651
Known Workarounds
Use an Intel Mac.
Configuration
No response
Other information
No response