Job Noorman
8bbfac7be1
[BOLT][NFC] Fix UB due to unaligned load in DebugStrOffsetsWriter
The following tests fail when enabling UBSan due to an unaligned memory
load:
> runtime error: load of misaligned address 0x620000000643 for type
> 'const uint32_t' (aka 'const unsigned int'), which requires 4 byte
> alignment
BOLT :: AArch64/asm-func-debug.test
BOLT :: AArch64/update-debug-reloc.test
BOLT :: X86/asm-func-debug.test
BOLT :: X86/dwarf5-df-dualcu.test
BOLT :: X86/dwarf5-df-mono-dualcu.test
BOLT :: X86/dwarf5-ftypes-dwp-input-dwo-output.test
BOLT :: X86/dwarf5-locaddrx.test
BOLT :: X86/dwarf5-split-dwarf4-monolithic.test
BOLT :: X86/inlined-function-mixed.test
BOLT :: non-empty-debug-line.test
This patch fixes this by using read32le for the load.
Reviewed By: ayermolo
Differential Revision: https://reviews.llvm.org/D148217
2023-04-13 16:39:22 +02:00
..
2023-03-14 15:35:05 -07:00
2023-04-06 16:21:49 +02:00
2022-06-05 13:29:49 -07:00
2022-11-28 10:00:34 +00:00
2023-04-11 17:19:39 -07:00
2022-07-30 10:35:49 -07:00
2023-03-24 21:59:50 +03:00
2022-12-20 11:05:50 +00:00
2023-04-13 16:39:22 +02:00
2023-01-03 17:32:11 -08:00
2023-02-09 10:57:10 -08:00
2022-09-03 11:17:32 -07:00
2023-01-25 12:59:11 -08:00
2023-03-14 17:26:36 -07:00
2022-11-21 19:24:32 -05:00
2023-03-17 17:24:19 +04:00