SVF-tools / SVF

Static Value-Flow Analysis Framework for Source Code
http://svf-tools.github.io/SVF/
Other
1.43k stars 436 forks source link

remove cast<SVFFunction> in svfcore and refactor ICFGBuilder #1575

Closed jumormt closed 4 weeks ago

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 89.39394% with 14 lines in your changes missing coverage. Please review.

Project coverage is 62.91%. Comparing base (5db169c) to head (045db84). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
svf/lib/DDA/ContextDDA.cpp 0.00% 6 Missing :warning:
svf/lib/AE/Svfexe/AEDetector.cpp 0.00% 2 Missing :warning:
svf/include/SVFIR/SVFVariables.h 88.88% 1 Missing :warning:
svf/lib/AE/Svfexe/AbsExtAPI.cpp 66.66% 1 Missing :warning:
svf/lib/Graphs/ThreadCallGraph.cpp 75.00% 1 Missing :warning:
svf/lib/SABER/SaberSVFGBuilder.cpp 0.00% 1 Missing :warning:
svf/lib/SVFIR/PAGBuilderFromFile.cpp 0.00% 1 Missing :warning:
svf/lib/SVFIR/SVFVariables.cpp 95.23% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575/graphs/tree.svg?width=650&height=150&src=pr&token=swDcvdBMse&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) ```diff @@ Coverage Diff @@ ## master #1575 +/- ## ========================================== + Coverage 62.86% 62.91% +0.05% ========================================== Files 244 244 Lines 25694 25729 +35 Branches 4514 4517 +3 ========================================== + Hits 16152 16188 +36 + Misses 9542 9541 -1 ``` | [Files with missing lines](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [svf-llvm/include/SVF-LLVM/ICFGBuilder.h](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf-llvm%2Finclude%2FSVF-LLVM%2FICFGBuilder.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmLWxsdm0vaW5jbHVkZS9TVkYtTExWTS9JQ0ZHQnVpbGRlci5o) | `100.00% <ø> (ø)` | | | [svf-llvm/include/SVF-LLVM/LLVMModule.h](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf-llvm%2Finclude%2FSVF-LLVM%2FLLVMModule.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmLWxsdm0vaW5jbHVkZS9TVkYtTExWTS9MTFZNTW9kdWxlLmg=) | `94.87% <100.00%> (+0.75%)` | :arrow_up: | | [svf-llvm/include/SVF-LLVM/SVFIRBuilder.h](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf-llvm%2Finclude%2FSVF-LLVM%2FSVFIRBuilder.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmLWxsdm0vaW5jbHVkZS9TVkYtTExWTS9TVkZJUkJ1aWxkZXIuaA==) | `90.09% <ø> (ø)` | | | [svf-llvm/lib/ICFGBuilder.cpp](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf-llvm%2Flib%2FICFGBuilder.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmLWxsdm0vbGliL0lDRkdCdWlsZGVyLmNwcA==) | `99.21% <100.00%> (-0.02%)` | :arrow_down: | | [svf-llvm/lib/LLVMModule.cpp](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf-llvm%2Flib%2FLLVMModule.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmLWxsdm0vbGliL0xMVk1Nb2R1bGUuY3Bw) | `83.82% <100.00%> (+0.04%)` | :arrow_up: | | [svf-llvm/lib/SVFIRBuilder.cpp](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf-llvm%2Flib%2FSVFIRBuilder.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmLWxsdm0vbGliL1NWRklSQnVpbGRlci5jcHA=) | `84.16% <100.00%> (+0.17%)` | :arrow_up: | | [svf-llvm/lib/SVFIRExtAPI.cpp](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf-llvm%2Flib%2FSVFIRExtAPI.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmLWxsdm0vbGliL1NWRklSRXh0QVBJLmNwcA==) | `84.87% <100.00%> (+0.12%)` | :arrow_up: | | [svf/include/SVFIR/SVFIR.h](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf%2Finclude%2FSVFIR%2FSVFIR.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmL2luY2x1ZGUvU1ZGSVIvU1ZGSVIuaA==) | `100.00% <100.00%> (ø)` | | | [svf/include/SVFIR/SymbolTableInfo.h](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf%2Finclude%2FSVFIR%2FSymbolTableInfo.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmL2luY2x1ZGUvU1ZGSVIvU3ltYm9sVGFibGVJbmZvLmg=) | `92.30% <100.00%> (ø)` | | | [svf/lib/AE/Svfexe/AbstractInterpretation.cpp](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree&filepath=svf%2Flib%2FAE%2FSvfexe%2FAbstractInterpretation.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3ZmL2xpYi9BRS9TdmZleGUvQWJzdHJhY3RJbnRlcnByZXRhdGlvbi5jcHA=) | `84.60% <100.00%> (ø)` | | | ... and [16 more](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/SVF-tools/SVF/pull/1575/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)
jumormt commented 1 month ago

--- log/redis-server.log 2024-10-15 17:42:35.668557695 +1100 +++ log/redis-server-xiao.log 2024-10-15 17:43:04.112275957 +1100 @@ -31,9 +31,9 @@ VarArrayObj 831 VarStructObj 1664 ----------------Time and memory stats-------------------- -LLVMIRTime 4.467 -SVFIRTime 2.539 -SymbolTableTime 0.571 +LLVMIRTime 4.559 +SVFIRTime 2.586 +SymbolTableTime 0.582 #######################################################

*CallGraph Stats (Andersen analysis)*** @@ -60,11 +60,11 @@ CollapseTime 0 CopyGepTime 0 LoadStoreTime 0 -MemoryUsageVmrss 4.16453e+06 -MemoryUsageVmsize 4.16452e+06 +MemoryUsageVmrss 4.16463e+06 +MemoryUsageVmsize 4.16453e+06 SCCDetectTime 0 SCCMergeTime 0 -TotalTime 126.559 +TotalTime 132.016 UpdateCGTime 0 ----------------Numbers stats---------------------------- AddrProcessed 17887 @@ -115,32 +115,32 @@ Persistent Points-To Cache Statistics: Andersen's analysis bitvector ################ (program : redis-server.bc)############### UniquePointsToSets 44837 -TotalUnions 673048 +TotalUnions 673066 PropertyUnions 222658 -UniqueUnions 19260 -LookupUnions 395148 -PreemptiveUnions 35982 +UniqueUnions 19259 +LookupUnions 395149 +PreemptiveUnions 36000 TotalComplements 3364152 PropertyComplements 2998574 UniqueComplements 16887 LookupComplements 331806 PreemptiveComplements 16885 -TotalIntersections 4182799 -PropertyIntersections 4145551 -UniqueIntersections 827 -LookupIntersections 2136 -PreemptiveIntersections 34285 +TotalIntersections 4182818 +PropertyIntersections 4145422 +UniqueIntersections 859 +LookupIntersections 2233 +PreemptiveIntersections 34304 #######################################################

*Memory SSA Statistics*** ################ (program : redis-server.bc)############### ----------------Time and memory stats-------------------- AverageRegSize 85.0301 -GenMUCHITime 1.916 -GenRegionTime 495.249 -InsertPHITime 0.576 -SSARenameTime 0.073 -TotalMSSATime 497.818 +GenMUCHITime 2.136 +GenRegionTime 521.459 +InsertPHITime 0.599 +SSARenameTime 0.09 +TotalMSSATime 524.288 ----------------Numbers stats---------------------------- BBHasMSSAPhi 10755 CSChiNode 112337 @@ -163,13 +163,13 @@ *SVFG Statistics*** ################ (program : redis-server.bc)############### ----------------Time and memory stats-------------------- -ATNodeTime 0.841 +ATNodeTime 0.889 AvgWeight 166.005 ConnDirEdgeTime 0 -ConnIndEdgeTime 4.422 +ConnIndEdgeTime 4.514 OptTime 0 TLNodeTime 0 -TotalTime 5.263 +TotalTime 5.403 ----------------Numbers stats---------------------------- ActualIn 164766 ActualOut 112337 @@ -231,20 +231,20 @@ GepTime 0 IndirectPropaTime 0 LoadTime 0 -MemoryUsageVmrss 3.58231e+06 -MemoryUsageVmsize 3.61995e+06 +MemoryUsageVmrss 3.58145e+06 +MemoryUsageVmsize 3.6151e+06 PhiTime 0 -PrelabelingTime 0.143 +PrelabelingTime 0.138 ProcessTime 0 PropagationTime 0 SCCTime 0 -SolveTime 454.763 +SolveTime 452.18 StoreTime 0 Strong/WeakUpdTime 0 -TotalTime 683.625 +TotalTime 680.228 UpdateCGTime 0 VersionPropTime 0 -meldLabelingTime 225.543 +meldLabelingTime 224.626 ----------------Numbers stats---------------------------- CopysNum 14138 DummyFieldPtrs 2305 @@ -262,13 +262,13 @@ Pointers 494739 ProcessedAParam 0 ProcessedAddr 107322 -ProcessedCopy 166998 +ProcessedCopy 162621 ProcessedFRet 0 -ProcessedGep 884728 -ProcessedLoad 906110 +ProcessedGep 867813 +ProcessedLoad 899841 ProcessedMSSANode 2318016 -ProcessedPhi 107267 -ProcessedStore 329614 +ProcessedPhi 104061 +ProcessedStore 325349 SolveIterations 6 StoresNum 24164 StrongUpdates 3378 @@ -283,12 +283,12 @@

Persistent Points-To Cache Statistics: flow-sensitive analysis bitvector ################ (program : redis-server.bc)############### -UniquePointsToSets 29679 -TotalUnions 1225752287 -PropertyUnions 1065411410 -UniqueUnions 37507 -LookupUnions 160252737 -PreemptiveUnions 50633 +UniquePointsToSets 29670 +TotalUnions 1169493666 +PropertyUnions 1011920510 +UniqueUnions 38239 +LookupUnions 157483452 +PreemptiveUnions 51465 TotalComplements 0 PropertyComplements 0 UniqueComplements 0