aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-06-15 10:34:33 -0700
committerFangrui Song <i@maskray.me>2023-06-15 10:34:33 -0700
commitdaba24ee7bd3d80f085e2e5f057af6b873a78a24 (patch)
tree4ec76389c88bcdf0d624a2ef874373540ff3f5fa /llvm/lib/Bitcode/Reader/MetadataLoader.cpp
parentfaf7cd97d07c6c2242a96f5daf94fb05cda0c115 (diff)
downloadllvm-daba24ee7bd3d80f085e2e5f057af6b873a78a24.zip
llvm-daba24ee7bd3d80f085e2e5f057af6b873a78a24.tar.gz
llvm-daba24ee7bd3d80f085e2e5f057af6b873a78a24.tar.bz2
[ELF] << >>: make RHS less than 64
The left/right shift linker script operators may trigger UB. E.g. in linkerscript/end-overflow-check.test, the initial REGION1__PADDED_SR_SHIFT is uint64_t(-3), cause the following expression to trigger an out-of-range shift in a ubsan build of lld. REGION1__PADDED_SR_SIZE = MAX(1 << REGION1__PADDED_SR_SHIFT, 32); Protect such UBs by making RHS less than 64.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/MetadataLoader.cpp')
0 files changed, 0 insertions, 0 deletions