|
Static Value-Flow Analysis
|
#include <MTA.h>
Public Types | |
| using | ResolveIndirectCalls = std::function< void(CallGraph *)> |
| 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 |
| void | runOnModule (SVFIR *pag, const ResolveIndirectCalls &resolveIndirectCalls) |
| Run the slicing pipeline on a pre-built SVFIR. | |
Private Member Functions | |
| bool | runPreAnalysis (const ResolveIndirectCalls &resolveIndirectCalls) |
| bool | runMTASlicingAndAnalysis () |
| bool | runPTASlicingAndAnalysis () |
| bool | runFinalRaceDetection () |
| void | buildVFGPre () |
| void | 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 (BVDataPTAImpl *slicedPTA, MHP *slicedMHP, LockAnalysis *slicedLockAnalysis) |
| Re-check the candidate race pairs on the sliced graph using FSAM points-to. | |
| LockAnalysis * | buildFullLockAnalysis () |
Private Attributes | |
| SVFIR * | svfIr = nullptr |
| u32_t | mainCxtDepth = 2 |
| std::unique_ptr< TCT > | tct |
| std::unique_ptr< MHP > | mhp |
| std::unique_ptr< LockAnalysis > | lockAnalysis |
| AndersenWaveDiff * | preAnder = nullptr |
| std::unique_ptr< MTASVFGBuilder > | vfgPreBuilder |
| SVFG * | vfgPre = nullptr |
| std::unique_ptr< MultiStageSlicer > | multiStageSlicer |
| std::unique_ptr< SingleSlicer > | singleSlicer |
| std::set< const ICFGNode * > | singleSlicedNodes |
| std::unique_ptr< SlicedSVFIRView > | mtaSlicedView |
| std::unique_ptr< SlicedSVFIRView > | ptaSlicedView |
| std::unique_ptr< SlicedSVFGView > | slicedSVFGView |
| std::unique_ptr< FlowSensitive > | mtaFSMPTA |
| std::unique_ptr< SlicedTCT > | slicedTCT |
| std::unique_ptr< MHP > | slicedMhp |
| std::unique_ptr< LockAnalysis > | slicedLockAnalysis |
| std::unique_ptr< SlicedSVFIRView > | fullLockView |
| std::unique_ptr< SlicedTCT > | fullLockTCT |
| std::unique_ptr< LockAnalysis > | fullLockAnalysis |
| 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 single LLVM-dependent step – materialising resolved indirect calls into the PAG – is injected by the caller as a callback (see runOnModule).
Behaviour is controlled by Options (MTFlowSensitive, EnableSlicing, SlicingSingle, SlicedDumpDot).
| using SVF::SlicedMTA::ResolveIndirectCalls = std::function<void(CallGraph*)> |
The one LLVM-dependent step of the pipeline: resolve the indirect-call edges discovered by Andersen into PAG copy/call edges. The caller (the LLVM-aware tool) supplies it via SVFIRBuilder::updateCallGraph.
|
default |
| SlicedMTA::~SlicedMTA | ( | ) |
Definition at line 469 of file MTA.cpp.
|
private |
Definition at line 855 of file MTA.cpp.
|
private |
Definition at line 508 of file MTA.cpp.
|
private |
Re-check the candidate race pairs on the sliced graph using FSAM points-to.
Definition at line 1057 of file MTA.cpp.
|
private |
Main pointer-analysis instance feeding final race detection (the flow-sensitive FSAM, a BVDataPTAImpl queried polymorphically).
Definition at line 485 of file MTA.cpp.
Union of both statements of every candidate race pair (the slice targets).
|
private |
Definition at line 872 of file MTA.cpp.
|
private |
Definition at line 634 of file MTA.cpp.
| void SlicedMTA::runOnModule | ( | SVFIR * | pag, |
| const ResolveIndirectCalls & | resolveIndirectCalls | ||
| ) |
Run the slicing pipeline on a pre-built SVFIR.
Definition at line 998 of file MTA.cpp.
|
private |
Definition at line 527 of file MTA.cpp.
|
private |
Definition at line 751 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 941 of file MTA.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |