[clang] [analyzer] Fix StdLibraryFunctionsChecker crash on surprising sink node (PR #66109)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 13 02:34:09 PDT 2023
================
@@ -1427,8 +1427,13 @@ void StdLibraryFunctionsChecker::checkPostCall(const CallEvent &Call,
});
Pred = C.addTransition(NewState, Pred, Tag);
}
- if (!Pred)
+ if (!Pred || Pred->isSink()) {
+ // Pred may be:
+ // - a nullpointer, when the generated node is not new;
+ // - a sink, when NewState is posteriorly overconstrained.
+ // In these situations we cannot add the errno note tag.
----------------
DonatNagyE wrote:
I updated the patch.
https://github.com/llvm/llvm-project/pull/66109
More information about the cfe-commits
mailing list