|
Static Value-Flow Analysis
|
#include <MTA.h>
Classes | |
| struct | RaceDigests |
Public Types | |
| using | RacePair = MTA::RacePair |
| The shared race detector lives in MTA; reuse its race-pair type. | |
Public Member Functions | |
| SlicedMTA () | |
| ~SlicedMTA () | |
| SlicedMTA (const SlicedMTA &)=delete | |
| SlicedMTA & | operator= (const SlicedMTA &)=delete |
| bool | runOnModule (SVFIR *pag, AndersenWaveDiff &preAnalysis) |
| Run the slicing pipeline with its prepared Andersen pre-analysis. | |
Private Member Functions | |
| bool | runPreAnalysis () |
| bool | runMTASlicingAndAnalysis () |
| bool | runPTASlicingAndAnalysis () |
| bool | runFinalRaceDetection () |
| void | buildPreAnalysisSVFG () |
| bool | runWholeProgramDetection () |
| BVDataPTAImpl * | getMainPTA () const |
| std::set< const SVFStmt * > | getVulnerableStmts () const |
| Union of both statements of every candidate race pair (the slice targets). | |
| std::set< RacePair > | detectRacePairsOnSlicedGraph (const std::set< RacePair > &preAnalysisRacePairs, BVDataPTAImpl *slicedPTA, MHP *slicedMHP, LockAnalysis *slicedLockAnalysis) |
| Refine the pre-analysis candidate pairs with main-phase ILA and FSAM. | |
Static Private Member Functions | |
| static void | reportOriginalStatistics (SVFIR *svfir) |
| Pipeline utilities shared by the sliced and whole-program paths. | |
| static std::set< const ICFGNode * > | collectICFGNodes (SVFG *svfg, const NodeBS &svfgNodeIds) |
| static void | reportPTASliceStatistics (const std::set< const ICFGNode * > &icfgNodes) |
| static std::string | raceStatementKey (const SVFStmt *statement) |
| static void | updateDigest (u64_t &digest, const std::string &value) |
| static RaceDigests | computeRaceDigests (const std::set< RacePair > &pairs) |
Private Attributes | |
| SVFIR * | svfir = nullptr |
| u32_t | mainContextDepth |
| std::unique_ptr< TCT > | tct |
| std::unique_ptr< MHP > | mhp |
| std::unique_ptr< LockAnalysis > | lockAnalysis |
| AndersenWaveDiff * | preAndersen = nullptr |
| ThreadCallGraph * | threadCallGraph = nullptr |
| std::unique_ptr< MTASVFGBuilder > | preSVFGBuilder |
| SVFG * | preSVFG = nullptr |
| std::unique_ptr< MultiStageSlicer > | multiStageSlicer |
| NodeBS | preCandidateSolveNodeIds |
| std::unique_ptr< SingleSlicer > | singleSlicer |
| MTASVFGBuilder::ThreadVFCandidateList | selectedThreadVFCandidates |
| std::set< const ICFGNode * > | singleSlicedNodes |
| NodeBS | singleSlicedSVFGNodeIds |
| std::unique_ptr< SlicedSVFIRView > | mtaSlicedView |
| std::unique_ptr< SlicedSVFIRView > | ptaSlicedView |
| std::unique_ptr< SlicedSVFGView > | slicedSVFGView |
| std::unique_ptr< FlowSensitive > | mainFSMPTA |
| std::unique_ptr< SlicedTCT > | slicedTCT |
| std::unique_ptr< MHP > | slicedMHP |
| std::unique_ptr< LockAnalysis > | slicedLockAnalysis |
| bool | hasThreadFunctions = false |
| std::set< RacePair > | racePairs |
Multi-stage on-demand slicing race detection pipeline (MSli).
runOnModule drives five stages on a pre-built SVFIR:
It operates entirely on the SVFIR (LLVM-free). The LLVM-aware caller runs the Andersen pre-analysis and materialises its resolved indirect calls into the PAG before invoking runOnModule.
Behaviour is controlled by Options (MTFlowSensitive, MTAEnableSlicing, MTASingleStageSlicing, DumpMTAGraphs).
|
default |
|
private |
Definition at line 608 of file MTA.cpp.
|
staticprivate |
Definition at line 470 of file MTA.cpp.
|
staticprivate |
Definition at line 543 of file MTA.cpp.
|
private |
Refine the pre-analysis candidate pairs with main-phase ILA and FSAM.
Definition at line 1345 of file MTA.cpp.
|
private |
Main pointer-analysis instance feeding final race detection (the flow-sensitive FSAM, a BVDataPTAImpl queried polymorphically).
Definition at line 587 of file MTA.cpp.
Union of both statements of every candidate race pair (the slice targets).
Definition at line 594 of file MTA.cpp.
Definition at line 504 of file MTA.cpp.
|
staticprivate |
Pipeline utilities shared by the sliced and whole-program paths.
Definition at line 445 of file MTA.cpp.
|
staticprivate |
Definition at line 486 of file MTA.cpp.
|
private |
Definition at line 1087 of file MTA.cpp.
|
private |
Definition at line 738 of file MTA.cpp.
| bool SlicedMTA::runOnModule | ( | SVFIR * | pag, |
| AndersenWaveDiff & | preAnalysis | ||
| ) |
Run the slicing pipeline with its prepared Andersen pre-analysis.
Definition at line 1276 of file MTA.cpp.
|
private |
Definition at line 631 of file MTA.cpp.
|
private |
Definition at line 904 of file MTA.cpp.
|
private |
No-slice A/B baseline: run the FSAM detection on the whole program (no slicing), so its time and race set can be compared against the sliced run.
Definition at line 1177 of file MTA.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |