3 Commits

Author SHA1 Message Date
Gábor Horváth
f8dd127842
[clang][analyzer] Remove a copy in a loop in VAListChecker (#162620)
Co-authored-by: Gabor Horvath <gaborh@apple.com>
2025-10-09 12:46:00 +01:00
Donát Nagy
b642e8bfbb
[analyzer] Improve messaging in security.VAList (#157846)
Previously the checker `security.VAList` only tracked the set of the
inintialized `va_list` objects; this commit replaces this with a mapping
that can distinguish the "uninitialized" `va_list` objects from the
"already released" ones. Moreover, a new "unknown" state is introduced
to replace the slightly hacky solutions that checked the `Symbolic`
nature of the region.

In addition to sligthly improving the messages, this commit also
prepares the ground for a follow-up change that would introduce an
"indeterminate" state (which needs `va_end` but cannot be otherwise
used) to model the requirements of SEI CERT rule MSC39-C, which states:

> The va_list may be passed as an argument to another function, but
> calling va_arg() within that function causes the va_list to have an
> indeterminate value in the calling function. As a result, attempting
> to read variable arguments without reinitializing the va_list can have
> unexpected behavior.
2025-09-11 17:57:22 +02:00
Donát Nagy
414f028556
[NFC][analyzer] Rename ValistChecker.cpp to VAListChecker.cpp (#157438)
...to follow the capitalization style that was already applied within
the file by recent commit a80c393a9c498279a1ec9fd630535b9ff139b49f.
2025-09-08 15:06:46 +02:00