diff options
| author | Job Noorman <jnoorman@igalia.com> | 2023-04-13 16:38:45 +0200 |
|---|---|---|
| committer | Job Noorman <jnoorman@igalia.com> | 2023-04-13 16:39:22 +0200 |
| commit | 8bbfac7be1b1be94a7a95aaf602cc224f6e504e7 (patch) | |
| tree | e53626850d2834a96c8231dd053d41ca0a0fd1e1 /lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp | |
| parent | 934373886e08492e70245c56468c91d4f59595b8 (diff) | |
| download | llvm-8bbfac7be1b1be94a7a95aaf602cc224f6e504e7.zip llvm-8bbfac7be1b1be94a7a95aaf602cc224f6e504e7.tar.gz llvm-8bbfac7be1b1be94a7a95aaf602cc224f6e504e7.tar.bz2 | |
[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
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/JSON/ObjectFileJSON.cpp')
0 files changed, 0 insertions, 0 deletions
