|
Static Value-Flow Analysis
|
#include <MTA.h>
Classes | |
| struct | RaceClass |
| struct | RaceClassKey |
| struct | RaceOccurrence |
| One occurrence of a memory access under one thread instance. More... | |
| struct | RacePair |
| A race pair: two statements that may race. More... | |
Public Member Functions | |
| MTA () | |
| Constructor. | |
| virtual | ~MTA () |
| Destructor. | |
| virtual bool | runOnModule (SVFIR *module) |
| We start the pass here. | |
| virtual MHP * | computeMHP (TCT *tct) |
| Compute MHP. | |
| virtual LockAnalysis * | computeLocksets (TCT *tct) |
| Compute locksets. | |
| virtual void | reportRaces () |
| Run the shared detector and print a race report. | |
| MHP * | getMHP () |
| LockAnalysis * | getLockAnalysis () |
Static Public Member Functions | |
| static std::set< const SVFStmt * > | detectRace (SVFIR *svfir, AndersenBase *pta, MHP *mhp, LockAnalysis *lockAnalysis, CallGraph *callGraph, std::set< RacePair > &outRacePairs) |
| static PointsTo | getGlobalObjectVariables (SVFIR *svfir) |
| Escape/points-to helpers for the shared detector. | |
| static PointsTo | getPointsToClosure (AndersenBase *pta, const PointsTo &pts) |
| static bool | hasThreadFunctions (CallGraph *callGraph) |
Private Types | |
| using | ObjectToRaceOccurrences = Map< NodeID, std::vector< size_t > > |
Static Private Member Functions | |
| static void | collectRaceOccurrences (SVFIR *svfir, AndersenBase *pta, MHP *mhp, LockAnalysis *lockAnalysis, CallGraph *callGraph, const PointsTo &escapedObjects, std::vector< RaceOccurrence > &occurrences, ObjectToRaceOccurrences &objectToOccurrences) |
| Helpers for the equivalence-class race detector. | |
| static std::vector< RaceClass > | buildRaceClasses (const std::vector< RaceOccurrence > &occurrences, const std::vector< size_t > &occurrenceIndices) |
| static void | emitRacePairs (MHP *mhp, LockAnalysis *lockAnalysis, const std::vector< RaceOccurrence > &occurrences, const std::vector< RaceClass > &classes, std::set< RacePair > &outRacePairs) |
| static bool | occurrencesRace (MHP *mhp, const RaceOccurrence &first, const RaceOccurrence &second) |
| static void | commitRacePair (std::set< RacePair > &out, const RaceOccurrence &first, const RaceOccurrence &second) |
Private Attributes | |
| ThreadCallGraph * | tcg |
| std::unique_ptr< TCT > | tct |
| std::unique_ptr< MTAStat > | stat |
| MHP * | mhp |
| LockAnalysis * | lsa |
|
private |
| MTA::MTA | ( | ) |
|
virtual |
|
staticprivate |
Definition at line 289 of file MTA.cpp.
|
staticprivate |
Helpers for the equivalence-class race detector.
Definition at line 229 of file MTA.cpp.
|
staticprivate |
|
virtual |
Compute locksets.
Compute lock sets
Definition at line 106 of file MTA.cpp.
Compute MHP.
Definition at line 113 of file MTA.cpp.
|
static |
Shared equivalence-class race detector (used by both MTA::reportRaces and the SlicedMTA pipeline). Returns the racy statements and fills outRacePairs.
Definition at line 372 of file MTA.cpp.
|
staticprivate |
Definition at line 318 of file MTA.cpp.
Escape/points-to helpers for the shared detector.
Definition at line 132 of file MTA.cpp.
|
inline |
|
static |
Definition at line 161 of file MTA.cpp.
Whether the program has any thread (fork-target) function reachable via a fork edge.
Definition at line 1326 of file MTA.cpp.
|
staticprivate |
|
virtual |
Run the shared detector and print a race report.
Definition at line 420 of file MTA.cpp.
We start the pass here.
Perform data race detection
Definition at line 67 of file MTA.cpp.
|
private |
|
private |