[PATCH] D64451: [PoisonChecking] Validate inbounds annotation on getelementptr where possible
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 14 13:34:50 PDT 2019
aqjune added inline comments.
================
Comment at: lib/Transforms/Instrumentation/PoisonChecking.cpp:234
+ "upper.limit");
+ Checks.push_back(B.CreateICmp(ICmpInst::ICMP_UGT, Addr, UpperLimit));
+ }
----------------
Is this case covered as well?
```
a = alloca i32 // 4 bytes
p1 = gep a, -1
p2 = gep inbounds p1, 2
```
p2 is poison because p1 is not in-bounds pointer.
UpperCheck will succeed because Addr is smaller than a + 4.
================
Comment at: lib/Transforms/Instrumentation/PoisonChecking.cpp:280
+ break;
+ }
};
----------------
A silly question: where is the poison-ness of operands of GEP checked at?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64451/new/
https://reviews.llvm.org/D64451
More information about the llvm-commits
mailing list