aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorEduard Zingerman <eddyz87@gmail.com>2023-08-21 17:49:04 +0300
committerEduard Zingerman <eddyz87@gmail.com>2023-09-23 19:39:24 +0300
commitf22442553b8e0840f2fb5345529172a345cfba7d (patch)
treeee71924563144e35ef99d3cbf934c6f93605bed6 /clang/lib/Lex/ModuleMap.cpp
parenta6e81df289ec21a535971469d117d2ebe6ccabf4 (diff)
downloadllvm-f22442553b8e0840f2fb5345529172a345cfba7d.zip
llvm-f22442553b8e0840f2fb5345529172a345cfba7d.tar.gz
llvm-f22442553b8e0840f2fb5345529172a345cfba7d.tar.bz2
[BPF] Check jump and memory offsets to avoid truncation
The following assembly code should issue two errors specifying that both jump and load offsets are out of range: if r1 > r2 goto +100500 r1 = *(u64 *)(r1 - 100500) This commit updates BPFAsmParser to check that: - offset specified for jump is either identifier (label) or a 16-bit signed constant; - offset specified for memory operations is a signed 16-bit constant. (Which matches expectations in the BPFELFObjectWriter and BPFMCCodeEmitter). Differential Revision: https://reviews.llvm.org/D158425
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
0 files changed, 0 insertions, 0 deletions