Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add heap and stack obj var and fix CI #1608

Merged
merged 8 commits into from
Dec 18, 2024
Merged

Conversation

jumormt
Copy link
Contributor

@jumormt jumormt commented Dec 15, 2024

No description provided.

Copy link

codecov bot commented Dec 16, 2024

Codecov Report

Attention: Patch coverage is 75.36232% with 34 lines in your changes missing coverage. Please review.

Project coverage is 63.05%. Comparing base (3556d16) to head (5361548).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
svf/lib/SVFIR/SVFVariables.cpp 51.51% 16 Missing ⚠️
svf/include/SVFIR/SVFVariables.h 30.00% 7 Missing ⚠️
svf/lib/SVFIR/SVFFileSystem.cpp 57.14% 3 Missing ⚠️
svf/include/DDA/DDAVFSolver.h 60.00% 2 Missing ⚠️
svf-llvm/lib/LLVMUtil.cpp 83.33% 1 Missing ⚠️
svf-llvm/lib/SVFIRBuilder.cpp 96.66% 1 Missing ⚠️
svf/include/MemoryModel/PointerAnalysis.h 50.00% 1 Missing ⚠️
svf/lib/Graphs/ConsG.cpp 0.00% 1 Missing ⚠️
svf/lib/Graphs/IRGraph.cpp 0.00% 1 Missing ⚠️
svf/lib/WPA/AndersenSFR.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1608      +/-   ##
==========================================
+ Coverage   63.03%   63.05%   +0.01%     
==========================================
  Files         246      246              
  Lines       27402    27472      +70     
  Branches     4529     4535       +6     
==========================================
+ Hits        17274    17322      +48     
- Misses      10128    10150      +22     
Files with missing lines Coverage Δ
svf-llvm/include/SVF-LLVM/LLVMUtil.h 82.35% <ø> (ø)
svf/include/Graphs/GenericGraph.h 81.44% <100.00%> (ø)
svf/include/SVFIR/SVFFileSystem.h 27.12% <ø> (ø)
svf/include/SVFIR/SVFIR.h 100.00% <100.00%> (ø)
svf/include/Util/SVFUtil.h 86.00% <ø> (ø)
svf/lib/AE/Svfexe/AEDetector.cpp 84.57% <100.00%> (ø)
svf/lib/DDA/ContextDDA.cpp 60.18% <100.00%> (+0.75%) ⬆️
svf/lib/DDA/FlowDDA.cpp 64.44% <100.00%> (-0.78%) ⬇️
svf/lib/MSSA/MemRegion.cpp 70.55% <100.00%> (+0.09%) ⬆️
svf/lib/MemoryModel/PointerAnalysis.cpp 61.82% <100.00%> (ø)
... and 13 more

... and 2 files with indirect coverage changes

@@ -473,7 +473,7 @@ class DDAVFSolver
NodeID id = getPtrNodeID(var);
const MemObj* obj = _pag->getObject(id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

baseobjvar = _pag->getObject(id);
isa(baseobjvar)

const MemObj* mem = _pag->getObject(getPtrNodeID(var));
assert(mem && "memory object is null??");
return mem->isHeap();
return SVFUtil::isHeapOriginVar(_pag->getGNode(getPtrNodeID(var)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove isHeapOriginVar.

@@ -374,7 +374,11 @@ bool isHeapAllocExtCallViaRet(const CallICFGNode* cs);

bool isHeapAllocExtCall(const ICFGNode* cs);

/// Check if the given variable originates from the heap.
bool isHeapOriginVar(const SVFVar* var);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove


/// Check if the given variable originates from the heap.
bool isStackOriginVar(const SVFVar* var);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

@@ -577,13 +577,15 @@ bool MRGenerator::isNonLocalObject(NodeID id, const SVFFunction* curFun) const
const MemObj* obj = pta->getPAG()->getObject(id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getObject => getBaseObj.

@jumormt
Copy link
Contributor Author

jumormt commented Dec 16, 2024

--- log/redis-server.log 2024-12-16 17:53:12.879406997 +1100
+++ log/redis-server-xiao.log 2024-12-16 17:54:56.614375761 +1100
@@ -14,7 +14,7 @@
FunctionObjs 4948
GepsNum 84876
GlobalObjs 1147
-HeapObjs 278
+HeapObjs 279
IndCallSites 1132
LoadsNum 52473
MaxStructSize 17347
@@ -31,9 +31,9 @@
VarArrayObj 831
VarStructObj 1664
----------------Time and memory stats--------------------
-LLVMIRTime 4.514
-SVFIRTime 2.584
-SymbolTableTime 0.583
+LLVMIRTime 4.482
+SVFIRTime 2.605
+SymbolTableTime 0.581
#######################################################

PTACallGraph Stats (Andersen analysis)******
@@ -60,11 +60,11 @@
CollapseTime 0
CopyGepTime 0
LoadStoreTime 0
-MemoryUsageVmrss 4.16498e+06
-MemoryUsageVmsize 4.16455e+06
+MemoryUsageVmrss 4.16468e+06
+MemoryUsageVmsize 4.16452e+06
SCCDetectTime 0
SCCMergeTime 0
-TotalTime 128.157
+TotalTime 127.262
UpdateCGTime 0
----------------Numbers stats----------------------------
AddrProcessed 17887
@@ -115,47 +115,47 @@
Persistent Points-To Cache Statistics: Andersen's analysis bitvector
################ (program : redis-server.bc)###############
UniquePointsToSets 44837
-TotalUnions 673061
+TotalUnions 673050
PropertyUnions 222658
-UniqueUnions 19262
-LookupUnions 395146
-PreemptiveUnions 35995
+UniqueUnions 19260
+LookupUnions 395148
+PreemptiveUnions 35984
TotalComplements 3364152
PropertyComplements 2998574
UniqueComplements 16887
LookupComplements 331806
PreemptiveComplements 16885
-TotalIntersections 4182810
-PropertyIntersections 4145482
-UniqueIntersections 845
-LookupIntersections 2187
-PreemptiveIntersections 34296
+TotalIntersections 4182801
+PropertyIntersections 4145547
+UniqueIntersections 835
+LookupIntersections 2132
+PreemptiveIntersections 34287
#######################################################

Memory SSA Statistics******
################ (program : redis-server.bc)###############
----------------Time and memory stats--------------------
-AverageRegSize 85.4739
-GenMUCHITime 1.941
-GenRegionTime 462.345
-InsertPHITime 0.554
-SSARenameTime 0.108
-TotalMSSATime 464.956
+AverageRegSize 85.727
+GenMUCHITime 1.841
+GenRegionTime 554.86
+InsertPHITime 0.546
+SSARenameTime 0.088
+TotalMSSATime 557.346
----------------Numbers stats----------------------------
BBHasMSSAPhi 10755
-CSChiNode 112085
+CSChiNode 111246
CSHasChi 22679
CSHasMu 24549
-CSMuNode 164169
-FunEntryChi 24443
+CSMuNode 163193
+FunEntryChi 24294
FunHasEntryChi 3967
FunHasRetMu 4630
-FunRetMu 24374
+FunRetMu 24225
LoadHasMu 24342
LoadMuNode 43202
-MSSAPhi 59993
+MSSAPhi 59315
MaxRegSize 1650
-MemRegions 4556
+MemRegions 4538
StoreChiNode 14269
StoreHasChi 10507
#######################################################
@@ -163,16 +163,16 @@
SVFG Statistics******
################ (program : redis-server.bc)###############
----------------Time and memory stats--------------------
-ATNodeTime 0.849
-AvgWeight 166.605
+ATNodeTime 0.855
+AvgWeight 167.789
ConnDirEdgeTime 0
-ConnIndEdgeTime 4.427
+ConnIndEdgeTime 4.447
OptTime 0
TLNodeTime 0
-TotalTime 5.276
+TotalTime 5.302
----------------Numbers stats----------------------------
-ActualIn 164169
-ActualOut 112085
+ActualIn 163193
+ActualOut 111246
ActualParam 57426
ActualRet 7530
Addr 17887
@@ -184,25 +184,25 @@
DirectCallEdge 41434
DirectEdge 292884
DirectRetEdge 7351
-FormalIn 24443
-FormalOut 24374
+FormalIn 24294
+FormalOut 24225
FormalParam 7869
FormalRet 795
Gep 84876
-IndCallEdge 191215
-IndRetEdge 125679
-IndirectEdge 722123
-IndirectEdgeLabels 120309251
+IndCallEdge 189998
+IndRetEdge 124671
+IndirectEdge 717043
+IndirectEdgeLabels 120311897
Load 24342
-MSSAPhi 59993
+MSSAPhi 59315
MaxInDegree 9710
MaxIndInDeg 9710
MaxIndOutDeg 2458
MaxOutDegree 9600
PHI 6776
Store 24164
-TotalEdge 1015007
-TotalNode 630868
+TotalEdge 1009927
+TotalNode 628077
#######################################################

PTACallGraph Stats (Flow-sensitive analysis)******
@@ -223,7 +223,7 @@
----------------Time and memory stats--------------------
AddrTime 0
AverageSCCSize 19.105
-AvgPtsSize 67.7949
+AvgPtsSize 67.7948
AvgTopLvlPtsSize 369.968
AvgVersionPtsSize 32.3067
CopyTime 0
@@ -231,20 +231,20 @@
GepTime 0
IndirectPropaTime 0
LoadTime 0
-MemoryUsageVmrss 3.56773e+06
-MemoryUsageVmsize 3.6026e+06
+MemoryUsageVmrss 3.5817e+06
+MemoryUsageVmsize 3.61182e+06
PhiTime 0
-PrelabelingTime 0.149
+PrelabelingTime 0.152
ProcessTime 0
PropagationTime 0
SCCTime 0
-SolveTime 413.842
+SolveTime 424.95
StoreTime 0
Strong/WeakUpdTime 0
-TotalTime 625.016
+TotalTime 627.456
UpdateCGTime 0
VersionPropTime 0
-meldLabelingTime 207.838
+meldLabelingTime 209.153
----------------Numbers stats----------------------------
CopysNum 14138
DummyFieldPtrs 2305
@@ -262,33 +262,33 @@
Pointers 494739
ProcessedAParam 0
ProcessedAddr 107322
-ProcessedCopy 158384
+ProcessedCopy 161192
ProcessedFRet 0
-ProcessedGep 847425
-ProcessedLoad 837199
-ProcessedMSSANode 2310384
-ProcessedPhi 101646
-ProcessedStore 313925
+ProcessedGep 859709
+ProcessedLoad 856043
+ProcessedMSSANode 2293638
+ProcessedPhi 103499
+ProcessedStore 317670
SolveIterations 6
StoresNum 24164
StrongUpdates 3378
TotalEmptyVPts 0
-TotalExistingVPts 15080518
-TotalNonEmptyVPts 15080518
+TotalExistingVPts 15080539
+TotalNonEmptyVPts 15080539
TotalObjects 15741
TotalPointers 497044
TotalSingleVObjs 0
-TotalVersions 17442432
+TotalVersions 17442525
#######################################################

Persistent Points-To Cache Statistics: flow-sensitive analysis bitvector
################ (program : redis-server.bc)###############
-UniquePointsToSets 29203
-TotalUnions 1095942141
-PropertyUnions 958021873
-UniqueUnions 36016
-LookupUnions 137835599
-PreemptiveUnions 48653
+UniquePointsToSets 29493
+TotalUnions 1119345511
+PropertyUnions 965154842
+UniqueUnions 37583
+LookupUnions 154102445
+PreemptiveUnions 50641
TotalComplements 0
PropertyComplements 0
UniqueComplements 0

@yuleisui yuleisui merged commit 4bf4806 into SVF-tools:master Dec 18, 2024
3 checks passed
@jumormt jumormt deleted the heapstack branch December 25, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants