mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
5116ffc6e0
`LLVM-Unit :: Support/./SupportTests/ConvertUTFTest.ConvertUTF16LittleEndianToUTF8String` `FAIL`s on Solaris/sparcv9: In `llvm/lib/Support/ConvertUTFWrapper.cpp` (`convertUTF16ToUTF8String`) the `SrcBytes` arg is reinterpreted/accessed as `UTF16` (`unsigned short`, which requires 2-byte alignment on strict-alignment targets like Sparc) without anything guaranteeing the alignment, so the access yields a `SIGBUS`. This patch avoids this by enforcing the required alignment in the callers. Tested on `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D88824