[all-commits] [llvm/llvm-project] 2e30f8: [analyzer] Fix StreamChecker crash in fread modeli...
Balazs Benics via All-commits
all-commits at lists.llvm.org
Thu Sep 12 08:07:15 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2e30f8d114e1406b35dc63868a92f4279330251b
https://github.com/llvm/llvm-project/commit/2e30f8d114e1406b35dc63868a92f4279330251b
Author: Balazs Benics <benicsbalazs at gmail.com>
Date: 2024-09-12 (Thu, 12 Sep 2024)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
M clang/test/Analysis/fread.c
Log Message:
-----------
[analyzer] Fix StreamChecker crash in fread modeling (#108393)
In #93408
https://github.com/llvm/llvm-project/commit/69bc159142c6e4ed168e32a6168392d396f891de
I refined how invalidation is done for `fread`. It can crash, if the
"size" or "count" parameters of "fread" is a perfectly constrained
negative value. In such cases, when it will try to allocate a
SmallVector with a negative size, which will cause a crash.
To mitigate this issue, let's just guard against negative values.
CPP-3247
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list