aaru-dps / Aaru

Aaru Data Preservation Suite
Other
504 stars 33 forks source link

[UnitTest] [Marshal] [macOS] Marshalling CD-i directory record makes runtime crash with SIGBUS #791

Open claunia opened 1 year ago

claunia commented 1 year ago

Version

Development commit

Commit hash

HEAD

Tested debug version?

Which operating systems have you used?

What is the architectural bit size you're using?

What processor are you using?

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.
claunia commented 1 year ago

Confirmed works in linux/x64, win/x86, win/x64, osx/x64, fails in osx/arm64.