[PATCH] D21081: MPI-Checker patch for Clang Static Analyzer

Devin Coughlin via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 09:16:55 PDT 2016


dcoughlin created this revision.
dcoughlin added reviewers: zaks.anna, dcoughlin, Alexander_Droste.
dcoughlin added a subscriber: cfe-commits.

(Cloning the revision for the ASan issue since the old one is closed and can't be re-opened)

This patch adds a static analysis checker to verify the correct usage of the MPI API in C and C++.

3 path-sensitive checks are included: 
- Double nonblocking: Double request usage by nonblocking calls without intermediate wait
- Missing wait: Nonblocking call without matching wait.
- Unmatched wait: Waiting for a request that was never used by a nonblocking call

Examples of how to use the checker can be found on: GitHub https://github.com/0ax1/MPI-Checker

http://reviews.llvm.org/D21081

Files:
  include/clang/StaticAnalyzer/Checkers/Checkers.td
  include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h
  lib/StaticAnalyzer/Checkers/CMakeLists.txt
  lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.cpp
  lib/StaticAnalyzer/Checkers/MPI-Checker/MPIBugReporter.h
  lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.cpp
  lib/StaticAnalyzer/Checkers/MPI-Checker/MPIChecker.h
  lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.cpp
  lib/StaticAnalyzer/Checkers/MPI-Checker/MPIFunctionClassifier.h
  lib/StaticAnalyzer/Checkers/MPI-Checker/MPITypes.h
  lib/StaticAnalyzer/Core/MemRegion.cpp
  test/Analysis/MPIMock.h
  test/Analysis/MemRegion.cpp
  test/Analysis/mpichecker.cpp
  test/Analysis/mpicheckernotes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21081.59899.patch
Type: text/x-patch
Size: 59925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160607/4ecb052f/attachment-0001.bin>


More information about the cfe-commits mailing list