[all-commits] [llvm/llvm-project] 13d39c: [analyzer] Fix crash of StreamChecker when eval ca...
Balazs Benics via All-commits
all-commits at lists.llvm.org
Mon Jul 29 05:15:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 13d39cb6f7b20e596b66f59ebf4dba766451398b
https://github.com/llvm/llvm-project/commit/13d39cb6f7b20e596b66f59ebf4dba766451398b
Author: Balazs Benics <benicsbalazs at gmail.com>
Date: 2024-07-29 (Mon, 29 Jul 2024)
Changed paths:
M clang/docs/analyzer/checkers.rst
M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
M clang/test/Analysis/stream.c
Log Message:
-----------
[analyzer] Fix crash of StreamChecker when eval calling 'fopen' (#100990)
Actually, on the failure branch of `fopen`, the resulting pointer could
alias with `stdout` iff `stdout` is already known to be null.
We crashed in this case as the implementation assumed that the
state-split for creating the success and failure branches both should be
viable; thus dereferenced both of those states - leading to the crash.
To fix this, let's just only add this no-alias property for the success
path, and that's it :)
Fixes #100901
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