[PATCH] Reject multiplication by zero cases in MallocOverflowSecurityChecker
Aditya Kumar
hiraditya at msn.com
Thu May 14 21:51:09 PDT 2015
There is a TODO: in line 84. From where I picked up.
// TODO: ignore multiplications by 1, reject if multiplied by 0.
REPOSITORY
rL LLVM
================
Comment at: lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp:61
@@ +60,3 @@
+// Return true for redundant computations.
+static bool RedundantComputation(APSInt &Val, BinaryOperatorKind op) {
+ if (op == BO_Mul && Val == 0)
----------------
zaks.anna wrote:
> This is not a redundant computation, a redundant computation would be 1*x.
Ok, I'll change the name of the function.
http://reviews.llvm.org/D9741
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list