Repository navigation
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
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
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
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Activity
rolfbjarne commentedon Mar 12, 2024
CC @MichalStrehovsky
EgorBo commentedon Mar 12, 2024
Looks like it could be caused by #99140
EgorBo commentedon Mar 12, 2024
Although, I am not sure, that change only changes arm64 inside the JIT so shouldn't affect x64 anyhow (it's not even included for the x64 jit) 🤔
EgorBo commentedon Mar 12, 2024
@rolfbjarne I presume it happens on Rosetta, right?
EgorBo commentedon Mar 12, 2024
Ah, it's x64 emitting code for arm64 target (crosscompile)
rolfbjarne commentedon Mar 13, 2024
Both Rosetta and Intel macs.
rolfbjarne commentedon Mar 18, 2024
@EgorBo any updates on this?
steveisok commentedon Mar 21, 2024
/cc @agocke
EgorBo commentedon Mar 22, 2024
Sorry for the delay, the repro is not working for me, fails with
and I don't see any obvious issues in #99140, so I decided to revert it in #100143 and will take a look at it again later once I am less busy
jkotas commentedon Mar 22, 2024
This means that you are using mismatched versions of CoreLib and the compiler. You either need to build the runtime from the point the repro was created, or patch the runtime binaries in the repro.
rmarinho commentedon Mar 25, 2024
Seeems we need to test this actually fixes the issue #100220
rolfbjarne commentedon Apr 5, 2024
@EgorBo any updates on this?
EgorBo commentedon Apr 5, 2024
Sorry, was busy with internal things. I am not sure I understand why my revert #100147 was closed - it was supposed to revert the PR that uncovered this bug untill proper fix is landed into main. In order to unblock you. I am looking into it now
rmarinho commentedon Apr 8, 2024
This is blocking us from merging also new android versions of net9 on .net maui since they bump to preview4. Can we get some priority on this please?
Thanks
EgorBo commentedon Apr 8, 2024
#100289 is waiting for a review
Like I said, #100147 could be used to unblock (was closed by @lewing) you.
rolfbjarne commentedon Apr 15, 2024
Looks like this has been fixed now, so I guess this can be closed?
MichalStrehovsky commentedon Apr 15, 2024
Yup, doesn't look like any other work to do. Resolved with #100220.