Commit Graph

7 Commits

Author SHA1 Message Date
Devin Coughlin 160f19cdda [analyzer] Add checker to verify the correct usage of the MPI API
This commit adds a static analysis checker to verify the correct usage of the MPI API in C
and C++. This version updates the reverted r271981 to fix a memory corruption found by the
ASan bots.

Three 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 at https://github.com/0ax1/MPI-Checker

A patch by Alexander Droste!

Reviewers: zaks.anna, dcoughlin

Differential Revision: http://reviews.llvm.org/D21081

llvm-svn: 272529
2016-06-13 03:22:41 +00:00
Devin Coughlin fd6d0821eb Revert "[analyzer] Reapply r271907 (2nd try)."
Even with the fix in r271981, ASan is finding a stack use after return.

This reverts commits r271977 and r271981.

llvm-svn: 271984
2016-06-07 05:37:02 +00:00
Devin Coughlin cc1fb35705 [analyzer] Reapply r271907 (2nd try).
Second try at reapplying
"[analyzer] Add checker for correct usage of MPI API in C and C++."

Special thanks to Dan Liew for helping test the fix for the template
specialization compiler error with gcc.

The original patch is by Alexander Droste!

Differential Revision: http://reviews.llvm.org/D12761

llvm-svn: 271977
2016-06-07 04:23:08 +00:00
Devin Coughlin 917a42d8b5 Revert "Reapply "[analyzer] Add checker for correct usage of MPI API in C and C++.""
This reverts commit r271914. It is still breaking bots.

llvm-svn: 271920
2016-06-06 18:29:43 +00:00
Devin Coughlin 8027409be4 Reapply "[analyzer] Add checker for correct usage of MPI API in C and C++."
Reapply r271907 with a fix for the compiler error with gcc about specializing
clang::ento::ProgramStateTrait in a different namespace.

Differential Revision: http://reviews.llvm.org/D12761

llvm-svn: 271914
2016-06-06 18:08:35 +00:00
Devin Coughlin cc73e62ebe Revert "[analyzer] Add checker for correct usage of MPI API in C and C++."
This reverts commit r271907. It broke a bunch of bots with compile errors
about specializations in different namespaces.

llvm-svn: 271909
2016-06-06 17:01:08 +00:00
Devin Coughlin 83ccd1a994 [analyzer] Add checker for correct usage of MPI API in C and C++.
This commit adds a static analysis checker to check for 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
at https://github.com/0ax1/MPI-Checker

Reviewers: zaks.anna

A patch by Alexander Droste!

Differential Revision: http://reviews.llvm.org/D12761

llvm-svn: 271907
2016-06-06 16:47:16 +00:00