You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This started happening in a maestro bump here: dotnet/macios#21021, which at the moment is a bump from 8.0.109-servicing.24407.6 to 8.0.109-servicing.24419.10.
I'm on an M1, and this only happens when building for x64. I haven't tested on an x64 machine, but it's a possibility this is related/limited to Rosetta only.
This only happens when using CoreCLR, not with MonoVM.
The text was updated successfully, but these errors were encountered:
Sounds like a coreclr regression between runtime 8.0.7 and 8.0.8? The diff in dotnet/macios#21021 is confusing because the ref packs appear to be trailing the sdk version
The problem happens only under Rosetta. It was introduced by the #104818. We incorrectly leave CONTEXT_XSTATE set on the context even if the context returned by the OS didn't contain any AVX state. When later resuming execution after catch, our RtlRestoreContext attempts to set ymm registers due to the CONTEXT_XSTATE being present. And that crashes with SIGBUS, as Rosetta doesn't support AVX instructions (which are used to set the ymm registers).
The issue doesn't occur on .NET 9 because we have added stripping the CONTEXT_XSTATE from the context before we start unwinding from it during EH recently. we are using a ClrRestoreNonVolatileContext which doesn't restore the ymm registers.
Description
The app crashes after exception handling when a NullReferenceException occurs in a background thread.
Reproduction Steps
Project file:
Run like this:
Two points of note here:
macOS also creates a crash report: https://gist.github.com/rolfbjarne/4b6ba90b127d180a07414c18fef4b17e (which corroborates the SIGBUS termination).
The crashing thread:
While creating a smaller test case, the crashing stack trace was typically a bit different: https://gist.github.com/rolfbjarne/6d0d1ee838cdae83cfddc8970afe01ec
Hopefully it's the same issue though.
Expected behavior
No crash.
Actual behavior
Crash
Regression?
Yes.
This started happening in a maestro bump here: dotnet/macios#21021, which at the moment is a bump from 8.0.109-servicing.24407.6 to 8.0.109-servicing.24419.10.
Known Workarounds
No response
Configuration
Other information
I'm on an M1, and this only happens when building for x64. I haven't tested on an x64 machine, but it's a possibility this is related/limited to Rosetta only.
This only happens when using CoreCLR, not with MonoVM.
The text was updated successfully, but these errors were encountered: