[PATCH] D158813: [analyzer] MPIChecker: MPI_Waitall should respect count arg

Ding Fei via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 09:32:40 PDT 2023


danix800 added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp:46-48
+    if (!ErrorNode)
+      return;
+
----------------
steakhal wrote:
> If these hunks are not closely related to the issue you intend to fix in this PR, I'd suggesst submitting it separately. That is a common API, and we wouldn't need tests for such defensive checks, as they rarely trigger.
Moved (together with the extra testcase file) into https://reviews.llvm.org/D158858.

Checking `ExplodedNode` against nullptr is a convention in almost all checkers. It surely can be null (quite often).

`MPIChecker` is one of the only two checkers that forget to do this checking and crashed as reported by #64647


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158813/new/

https://reviews.llvm.org/D158813



More information about the cfe-commits mailing list