[clang] Adding optin.taint.TaintedDiv checker (PR #106389)
Daniel Krupp via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 26 06:22:25 PDT 2024
dkrupp wrote:
> LGTM overall, I added some minor inline remarks.
>
> Also consider adding a few simple testcases to distinguish the effects of DivideZero and TaintedDiv. It would also be interesting to highlight what happens in situations like
>
> ```c
> int test(void) {
> int x = getchar(); // or any other taint source
> if (!x)
> return 5 / x;
> return 8;
> }
> ```
>
> (I presume that in this case core.DivideZero will create a bug report, but the new TaintedDiv checker won't.)
Test added.
https://github.com/llvm/llvm-project/pull/106389
More information about the cfe-commits
mailing list