clang 20.0.0git
|
Public Member Functions | |
MPIChecker () | |
void | checkPreCall (const CallEvent &CE, CheckerContext &Ctx) const |
void | checkDeadSymbols (SymbolReaper &SymReaper, CheckerContext &Ctx) const |
void | dynamicInit (CheckerContext &Ctx) const |
void | checkDoubleNonblocking (const clang::ento::CallEvent &PreCallEvent, clang::ento::CheckerContext &Ctx) const |
Checks if a request is used by nonblocking calls multiple times in sequence without intermediate wait. | |
void | checkUnmatchedWaits (const clang::ento::CallEvent &PreCallEvent, clang::ento::CheckerContext &Ctx) const |
Checks if the request used by the wait function was not used at all before. | |
void | checkMissingWaits (clang::ento::SymbolReaper &SymReaper, clang::ento::CheckerContext &Ctx) const |
Check if a nonblocking call is not matched by a wait. | |
Public Member Functions inherited from clang::ento::CheckerBase | |
StringRef | getTagDescription () const override |
CheckerNameRef | getCheckerName () const |
virtual void | printState (raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep) const |
See CheckerManager::runCheckersForPrintState. | |
Public Member Functions inherited from clang::ProgramPointTag | |
ProgramPointTag (void *tagKind=nullptr) | |
virtual | ~ProgramPointTag () |
virtual StringRef | getTagDescription () const =0 |
const void * | getTagKind () const |
Used to implement 'isKind' in subclasses. | |
Additional Inherited Members | |
Static Public Member Functions inherited from clang::ento::Checker< check::PreCall, check::DeadSymbols > | |
static void | _register (CHECKER *checker, CheckerManager &mgr) |
Static Public Member Functions inherited from clang::ento::check::PreCall | |
template<typename CHECKER > | |
static void | _register (CHECKER *checker, CheckerManager &mgr) |
Definition at line 30 of file MPIChecker.h.
|
inline |
Definition at line 32 of file MPIChecker.h.
|
inline |
Definition at line 41 of file MPIChecker.h.
References checkMissingWaits(), and dynamicInit().
void clang::ento::mpi::MPIChecker::checkDoubleNonblocking | ( | const clang::ento::CallEvent & | PreCallEvent, |
clang::ento::CheckerContext & | Ctx | ||
) | const |
Checks if a request is used by nonblocking calls multiple times in sequence without intermediate wait.
The check contains a guard, in order to only inspect nonblocking functions.
PreCallEvent | MPI call to verify |
Definition at line 25 of file MPIChecker.cpp.
References clang::ento::CheckerContext::addTransition(), clang::ento::mpi::Request::CurrentState, clang::ento::CheckerContext::generateNonFatalErrorNode(), clang::ento::CallEvent::getArgSVal(), clang::ento::SVal::getAsRegion(), clang::ento::CheckerContext::getBugReporter(), clang::ento::CallEvent::getCalleeIdentifier(), clang::ento::CallEvent::getNumArgs(), clang::ento::CheckerContext::getState(), clang::ento::ExplodedNode::getState(), clang::ento::SubRegion::getSuperRegion(), clang::ento::mpi::Request::Nonblocking, and clang::ento::mpi::MPIBugReporter::reportDoubleNonblocking().
Referenced by checkPreCall().
void clang::ento::mpi::MPIChecker::checkMissingWaits | ( | clang::ento::SymbolReaper & | SymReaper, |
clang::ento::CheckerContext & | Ctx | ||
) | const |
Check if a nonblocking call is not matched by a wait.
If a memory region is not alive and the last function using the request was a nonblocking call, this is rated as a missing wait.
Definition at line 101 of file MPIChecker.cpp.
References clang::ento::CheckerContext::addTransition(), clang::ento::CheckerContext::generateNonFatalErrorNode(), clang::ento::CheckerContext::getBugReporter(), clang::ento::CheckerContext::getState(), clang::ento::SymbolReaper::isLiveRegion(), clang::ento::mpi::Request::Nonblocking, and clang::ento::mpi::MPIBugReporter::reportMissingWait().
Referenced by checkDeadSymbols().
|
inline |
Definition at line 35 of file MPIChecker.h.
References checkDoubleNonblocking(), checkUnmatchedWaits(), and dynamicInit().
void clang::ento::mpi::MPIChecker::checkUnmatchedWaits | ( | const clang::ento::CallEvent & | PreCallEvent, |
clang::ento::CheckerContext & | Ctx | ||
) | const |
Checks if the request used by the wait function was not used at all before.
The check contains a guard, in order to only inspect wait functions.
PreCallEvent | MPI call to verify |
Definition at line 57 of file MPIChecker.cpp.
References clang::ento::CheckerContext::addTransition(), clang::ento::CheckerContext::generateNonFatalErrorNode(), clang::ento::CheckerContext::getBugReporter(), clang::ento::CallEvent::getCalleeIdentifier(), clang::ento::CheckerContext::getState(), clang::ento::SubRegion::getSuperRegion(), clang::ento::mpi::MPIBugReporter::reportUnmatchedWait(), and clang::ento::mpi::Request::Wait.
Referenced by checkPreCall().
|
inline |
Definition at line 46 of file MPIChecker.h.
References clang::ento::CheckerContext::getASTContext().
Referenced by checkDeadSymbols(), and checkPreCall().