[clang] [NFC][analyzer] Extract general logic in security.ArrayBound (PR #210774)
Balázs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 21 04:05:44 PDT 2026
steakhal wrote:
I can see a failed test in the premerge checks. How can we have failing tests with an NFC patch?
I've noticed a semantic change:
The taint check moved from inside the `ExceedsUpperBound` block up to `handleAccessExpr`, guarded by `mayBeInvalid() && mayBeValid()`. This makes tainted offsets that are ambiguous only on the lower bound (e.g. if `(idx < 10) buf[idx]` with tainted idx and a larger buffer) newly reportable as taint OOB, where the old code emitted no warning.
This is something that is likely to surface, so I'd carve it out of an NFC PR such that in the future we could come back to it if needed. This shouldn't be too difficult to hoist from this PR.
Other than this, the PR looks really solid.
https://github.com/llvm/llvm-project/pull/210774
More information about the cfe-commits
mailing list