Fix potential BitCast bug for platforms without unaligned reads (#89364)
authorMichał Petryka <35800402+MichalPetryka@users.noreply.github.com>
Sun, 23 Jul 2023 18:20:38 +0000 (20:20 +0200)
committerGitHub <noreply@github.com>
Sun, 23 Jul 2023 18:20:38 +0000 (11:20 -0700)
commit65536eb2f01ebb85a54e792a2b974fe76af7e230
tree8d9a6f13ea5cd8c0e2ce9dfd8283ac0512315c01
parentecef854c27861d9d1e25a3d7de76295cd8a92d3b
Fix potential BitCast bug for platforms without unaligned reads (#89364)

BitCast could potentially make an invalid read when reinterpreting a type to another that requires higher alignment, which could possibly cause a fault on Mono ARMv6.
src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/Unsafe.cs