clang 22.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 | getDebugTag () const override |
Attached to nodes created by this checker class when the ExplodedGraph is dumped for debugging. | |
Public Member Functions inherited from clang::ento::CheckerFrontend | |
void | enable (CheckerManager &Mgr) |
bool | isEnabled () const |
CheckerNameRef | getName () const |
Public Member Functions inherited from clang::ento::CheckerBackend | |
virtual void | printState (raw_ostream &Out, ProgramStateRef State, const char *NL, const char *Sep) const |
Debug state dump callback, see CheckerManager::runCheckersForPrintState. | |
Public Member Functions inherited from clang::ProgramPointTag | |
ProgramPointTag (void *tagKind=nullptr) | |
virtual | ~ProgramPointTag () |
const void * | getTagKind () const |
Used to implement 'isKind' in subclasses. |
Additional Inherited Members | |
Public Types inherited from clang::ento::Checker< check::PreCall, check::DeadSymbols > | |
using | BlockEntrance |
Static Public Member Functions inherited from clang::ento::Checker< check::PreCall, check::DeadSymbols > | |
static void | _register (CHECKER *Chk, 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::isa(), and clang::ento::mpi::Request::Nonblocking.
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 100 of file MPIChecker.cpp.
References clang::ento::CheckerContext::addTransition(), clang::ento::CheckerContext::generateNonFatalErrorNode(), clang::ento::CheckerContext::getBugReporter(), clang::ento::CheckerContext::getState(), clang::ento::ExplodedNode::getState(), clang::ento::SymbolReaper::isLiveRegion(), and clang::ento::mpi::Request::Nonblocking.
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::ExplodedNode::getState(), clang::ento::SubRegion::getSuperRegion(), clang::isa(), 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().