4 Commits

Author SHA1 Message Date
Balázs Kéri
dfac905925
[clang][analyzer] Extend lifetime of dynamic extent information (#163562)
Symbols used for dynamic extent information of memory regions are now
kept as live as long as the memory region exists.
2025-11-17 11:59:09 +01:00
Donát Nagy
5cbaf5552e
[analyzer] Show element count in ArrayBound underflow reports (#158639)
The underflow reports of checker security.ArrayBound previously
displayed the (negative) byte offset of the accessed location; but those
numbers were a bit hard to decipher (especially when the elements were
large structs), so this commit replaces the byte offset with an index
value (if the offset is an integer multiple of the size of the accessed
element).

This change only affects the content of the messages; the checker will
find the same issues before and after this commit.
2025-09-17 13:18:13 +02:00
T-Gruber
d63cc4c876
[analyzer] Unknown array lvalue element in Store (#133381)
Remove the early return for BaseRegions of type ElementRegion. Return
meaningful MemRegionVal for these cases as well.
Previous discussion:
https://discourse.llvm.org/t/lvalueelement-returns-unknownval-for-multi-dimensional-arrays/85476
2025-03-31 08:44:28 +02:00
Donát Nagy
a7d7db71db
[NFC][analyzer] OOB test consolidation IV: rename files (#129697)
This commit finishes the reorganization of the tests for the checker
`security.ArrayBound`.

Previously these tests were all named `out-of-bounds-*` which was only
weakly connected to the checker name; this commit moves them to a
directory named after the checker (`ArrayBound`). I decided to use a
directory instead of the more common filename prefix ("poor man's
directory") system because it seems to be a more natural use of the
filesystem and there are already a few precedents for it.

I also added (or edited) comments at the beginning of each test file to
describe their purpose; and I added a single new testcase to highlight
that the assumption note tags can be added to reports by any checker.
(Previously all tests in the file triggered out-of-bounds reports to
reveal the note tags; but that was just for convenience.)
2025-03-11 13:54:41 +01:00