Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around a Linux arm32 unaligned data issue in SuperPMI
impImportStaticReadOnlyField reads the data at the address returned by getFieldAddress. SuperPMI saves and replays this data, but it doesn't store it at a naturally aligned address. For int64/double (at least), this is a problem on Linux arm32, which raises a SIGBUS exception on such unaligned access. This works around the problem by copying the potentially unaligned data to a known aligned spot before reading it. This is only done under DEBUG and when we know we are replaying under SuperPMI. A proper fix would be to teach SuperPMI about alignment, but that would be a large and risky change, compared to this small and isolated workaround. The fixes the non-determinism of dotnet#56156.
- Loading branch information