Aaru
Aaru copied to clipboard
[UnitTest] [Marshal] [macOS] Marshalling CD-i directory record makes runtime crash with SIGBUS
Version
Development commit
Commit hash
HEAD
Tested debug version?
- [X] Yes
Which operating systems have you used?
- [ ] Windows
- [ ] Linux
- [X] macOS
- [ ] Other
What is the architectural bit size you're using?
- [ ] 32-bit
- [X] 64-bit
- [ ] Unsure or unknown
What processor are you using?
- [ ] An Intel or AMD
- [X] An ARM or Apple Silicon
- [ ] Unsure or unknown
Description
Marshalling CD-i's DirectoryRecord structure from unit test makes the kernel die with SIGBUS. Confirmed it does not happen in Linux/x64, unconfirmed if it happens in macOS/x64 or Windows.
Exact command line used
Unit test
Expected behavior
Correct big endian marshalling.
Actual behavior
At the middle of reversing the ending of the fields in https://github.com/aaru-dps/Aaru.Helpers/blob/c9e8b4dd0fddd6a1c222e583090efdfbf6c178dc/Marshal.cs#L270 a SIGBUS is received and killed by the kernel.
Output of command execution with debug output enabled
None.
Confirmed works in linux/x64, win/x86, win/x64, osx/x64, fails in osx/arm64.