svf-tools 1.0.402 → 1.0.405
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-doxygen/html/html/AndersenSFR_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/AndersenSFR_8h_source.html +2 -2
- package/SVF-doxygen/html/html/CHG_8h_source.html +5 -6
- package/SVF-doxygen/html/html/CPPUtil_8cpp.html +3 -3
- package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +3 -2
- package/SVF-doxygen/html/html/CSC_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/CSC_8h_source.html +3 -3
- package/SVF-doxygen/html/html/Conditions_8cpp_source.html +1 -2
- package/SVF-doxygen/html/html/ConsGEdge_8h_source.html +4 -4
- package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ExtAPI_8h_source.html +1 -1
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/GenericGraph_8h_source.html +2 -2
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/ICFGEdge_8h_source.html +5 -5
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/ICFG_8h_source.html +3 -3
- package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +3 -3
- package/SVF-doxygen/html/html/LLVMUtil_8cpp_source.html +1 -2
- package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/LocationSet_8h_source.html +7 -7
- package/SVF-doxygen/html/html/MHP_8cpp.html +2 -2
- package/SVF-doxygen/html/html/MHP_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PAGBuilderFromFile_8h_source.html +3 -3
- package/SVF-doxygen/html/html/SVFBasicTypes_8h.html +2 -2
- package/SVF-doxygen/html/html/SVFBasicTypes_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +10 -10
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +3 -3
- package/SVF-doxygen/html/html/SVFStatements_8h_source.html +6 -6
- package/SVF-doxygen/html/html/SVFVariables_8h_source.html +5 -5
- package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +1 -2
- package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +2 -3
- package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/VFGNode_8h_source.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ActualINSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ActualOUTSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ActualParmVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ActualRetVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AddrCGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AddrStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AddrVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1ArgumentVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AssignStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt-members.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +17 -17
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CHEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CHGraph-members.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1CHGraph.html +24 -24
- package/SVF-doxygen/html/html/classSVF_1_1CHNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CSC-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CSC.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1CallCFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallDirSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallIndSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneDummyObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneFIObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjVar.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CmpVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CondManager.html +1 -2
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CopyCGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CopyStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CopyVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DCHEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DCHNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DirectSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DummyObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DummyValVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DummyVersionPropSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1FIObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FormalINSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FormalOUTSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FormalParmVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FormalRetVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FunEntryICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FunExitICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GenericEdge.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1GepCGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepObjVar-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +13 -13
- package/SVF-doxygen/html/html/classSVF_1_1GepStmt-members.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1GepStmt.html +16 -16
- package/SVF-doxygen/html/html/classSVF_1_1GepVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepValVar-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepValVar.html +12 -12
- package/SVF-doxygen/html/html/classSVF_1_1GlobalICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1HareParForEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1ICFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1IRAnnotator.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1IndirectSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1InterICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1InterMSSAPHISVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1InterPHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraCFGEdge-members.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1IntraCFGEdge.html +24 -24
- package/SVF-doxygen/html/html/classSVF_1_1IntraDirSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraIndSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraMSSAPHISVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1IntraPHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LoadCGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LoadStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LoadVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet-members.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +48 -48
- package/SVF-doxygen/html/html/classSVF_1_1MRSVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MSSAPHISVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1NormalGepCGEdge-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1NormalGepCGEdge.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1NullPtrVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1PHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PTACallGraphEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PTACallGraphNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetCFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetDirSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetIndSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFBasicBlock.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFFunction.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFGlobal.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +16 -16
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder-members.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +63 -63
- package/SVF-doxygen/html/html/classSVF_1_1SVFStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFValue.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SelectStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StmtVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StoreCGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StoreStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StoreVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1TCTEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TCTNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadForkEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadJoinEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadMHPIndSVFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VFGEdge.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ValVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VarArgPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VariantGepCGEdge.html +1 -1
- package/SVF-doxygen/html/html/functions_a.html +6 -6
- package/SVF-doxygen/html/html/functions_b.html +1 -1
- package/SVF-doxygen/html/html/functions_f.html +2 -2
- package/SVF-doxygen/html/html/functions_func.html +6 -6
- package/SVF-doxygen/html/html/functions_func_f.html +1 -1
- package/SVF-doxygen/html/html/functions_func_g.html +9 -9
- package/SVF-doxygen/html/html/functions_func_i.html +1 -1
- package/SVF-doxygen/html/html/functions_func_s.html +2 -2
- package/SVF-doxygen/html/html/functions_func_v.html +1 -1
- package/SVF-doxygen/html/html/functions_g.html +9 -9
- package/SVF-doxygen/html/html/functions_i.html +1 -1
- package/SVF-doxygen/html/html/functions_l.html +1 -1
- package/SVF-doxygen/html/html/functions_n.html +1 -1
- package/SVF-doxygen/html/html/functions_s.html +3 -3
- package/SVF-doxygen/html/html/functions_type_n.html +1 -1
- package/SVF-doxygen/html/html/functions_type_s.html +1 -1
- package/SVF-doxygen/html/html/functions_v.html +3 -3
- package/SVF-doxygen/html/html/functions_vars_b.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_f.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_v.html +2 -2
- package/SVF-doxygen/html/html/namespaceSVF.html +5 -5
- package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +1 -1
- package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +4 -4
- package/SVF-doxygen/html/html/namespacemembers_s.html +1 -1
- package/SVF-doxygen/html/html/namespacemembers_type_s.html +1 -1
- package/SVF-doxygen/html/html/search/all_1.js +4 -4
- package/SVF-doxygen/html/html/search/all_13.js +4 -4
- package/SVF-doxygen/html/html/search/all_16.js +3 -3
- package/SVF-doxygen/html/html/search/all_2.js +1 -1
- package/SVF-doxygen/html/html/search/all_6.js +2 -2
- package/SVF-doxygen/html/html/search/all_7.js +5 -5
- package/SVF-doxygen/html/html/search/all_9.js +1 -1
- package/SVF-doxygen/html/html/search/all_c.js +1 -1
- package/SVF-doxygen/html/html/search/all_e.js +1 -1
- package/SVF-doxygen/html/html/search/functions_0.js +4 -4
- package/SVF-doxygen/html/html/search/functions_10.js +2 -2
- package/SVF-doxygen/html/html/search/functions_13.js +1 -1
- package/SVF-doxygen/html/html/search/functions_5.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +5 -5
- package/SVF-doxygen/html/html/search/functions_8.js +1 -1
- package/SVF-doxygen/html/html/search/functions_a.js +1 -1
- package/SVF-doxygen/html/html/search/typedefs_11.js +2 -2
- package/SVF-doxygen/html/html/search/typedefs_d.js +1 -1
- package/SVF-doxygen/html/html/search/variables_16.js +2 -2
- package/SVF-doxygen/html/html/search/variables_2.js +1 -1
- package/SVF-doxygen/html/html/search/variables_6.js +1 -1
- package/SVF-doxygen/html/html/structstd_1_1hash_3_01SVF_1_1LocationSet_01_4.html +2 -2
- package/include/Graphs/CHG.h +6 -6
- package/include/Graphs/ConsGEdge.h +1 -1
- package/include/Graphs/ICFG.h +1 -1
- package/include/Graphs/ICFGEdge.h +3 -3
- package/include/MemoryModel/LocationSet.h +5 -5
- package/include/MemoryModel/PAGBuilderFromFile.h +1 -1
- package/include/MemoryModel/SVFIR.h +1 -1
- package/include/MemoryModel/SVFStatements.h +4 -4
- package/include/MemoryModel/SVFVariables.h +2 -2
- package/include/MemoryModel/SymbolTableInfo.h +1 -1
- package/include/SVF-FE/SVFIRBuilder.h +2 -2
- package/include/Util/IRAnnotator.h +2 -2
- package/include/Util/SVFBasicTypes.h +1 -1
- package/include/WPA/AndersenSFR.h +1 -1
- package/include/WPA/CSC.h +1 -1
- package/lib/Graphs/ICFG.cpp +1 -1
- package/lib/MTA/MHP.cpp +2 -2
- package/lib/MemoryModel/LocationSet.cpp +3 -3
- package/lib/MemoryModel/PAGBuilderFromFile.cpp +2 -2
- package/lib/MemoryModel/SVFIR.cpp +1 -1
- package/lib/MemoryModel/SymbolTableInfo.cpp +3 -3
- package/lib/SVF-FE/CPPUtil.cpp +6 -6
- package/lib/SVF-FE/ICFGBuilder.cpp +1 -1
- package/lib/SVF-FE/LLVMUtil.cpp +1 -1
- package/lib/SVF-FE/SVFIRBuilder.cpp +17 -10
- package/lib/SVF-FE/SymbolTableBuilder.cpp +1 -1
- package/lib/Util/Conditions.cpp +1 -1
- package/lib/Util/ExtAPI.cpp +13 -0
- package/lib/Util/TypeBasedHeapCloning.cpp +1 -1
- package/lib/WPA/AndersenSFR.cpp +6 -6
- package/lib/WPA/CSC.cpp +5 -5
- package/lib/WPA/TypeAnalysis.cpp +3 -3
- package/package.json +1 -1
|
@@ -74,7 +74,7 @@ public:
|
|
|
74
74
|
//@{
|
|
75
75
|
void initialiseNodes();
|
|
76
76
|
void addEdge(NodeID src, NodeID dst, SVFStmt::PEDGEK kind,
|
|
77
|
-
|
|
77
|
+
s32_t offset = 0, Instruction* cs = nullptr);
|
|
78
78
|
// @}
|
|
79
79
|
|
|
80
80
|
/// Sanity check for SVFIR
|
|
@@ -220,7 +220,7 @@ protected:
|
|
|
220
220
|
void processCE(const Value *val);
|
|
221
221
|
|
|
222
222
|
/// Infer field index from byteoffset.
|
|
223
|
-
u32_t inferFieldIdxFromByteOffset(const llvm::GEPOperator* gepOp, DataLayout *dl, LocationSet& ls,
|
|
223
|
+
u32_t inferFieldIdxFromByteOffset(const llvm::GEPOperator* gepOp, DataLayout *dl, LocationSet& ls, s32_t idx);
|
|
224
224
|
|
|
225
225
|
/// Compute offset of a gep instruction or gep constant expression
|
|
226
226
|
bool computeGepOffset(const User *V, LocationSet& ls);
|
|
@@ -85,7 +85,7 @@ private:
|
|
|
85
85
|
{
|
|
86
86
|
std::string label = it->getName().str();
|
|
87
87
|
std::string toErase = "gepnode-";
|
|
88
|
-
SVF::
|
|
88
|
+
SVF::s32_t pos = label.find(toErase);
|
|
89
89
|
if (pos == std::string::npos)
|
|
90
90
|
{
|
|
91
91
|
continue;
|
|
@@ -96,7 +96,7 @@ private:
|
|
|
96
96
|
auto mdNode = it->getOperand(0);
|
|
97
97
|
|
|
98
98
|
SVF::NodeID baseNodeId = std::stoi(llvm::cast<llvm::MDString>(mdNode->getOperand(0))->getString().str());
|
|
99
|
-
SVF::
|
|
99
|
+
SVF::s32_t locationSetOffset = std::stoi(llvm::cast<llvm::MDString>(mdNode->getOperand(1))->getString().str());
|
|
100
100
|
|
|
101
101
|
LocationSet locationSet = LocationSet(locationSetOffset);
|
|
102
102
|
SVF::NodeID gepnodeId = pag->getGepObjVar(baseNodeId, locationSet);
|
|
@@ -149,7 +149,7 @@ public:
|
|
|
149
149
|
protected:
|
|
150
150
|
void initialize();
|
|
151
151
|
void PWCDetect();
|
|
152
|
-
void fieldExpand(NodeSet& initials,
|
|
152
|
+
void fieldExpand(NodeSet& initials, s32_t offset, NodeBS& strides, PointsTo& expandPts);
|
|
153
153
|
bool processGepPts(PointsTo& pts, const GepCGEdge* edge);
|
|
154
154
|
bool mergeSrcToTgt(NodeID nodeId, NodeID newRepId);
|
|
155
155
|
|
package/include/WPA/CSC.h
CHANGED
package/lib/Graphs/ICFG.cpp
CHANGED
|
@@ -352,7 +352,7 @@ ICFGEdge* ICFG::addIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode)
|
|
|
352
352
|
/*!
|
|
353
353
|
* Add conditional intraprocedural edges between two nodes
|
|
354
354
|
*/
|
|
355
|
-
ICFGEdge* ICFG::addConditionalIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode, const Value* condition,
|
|
355
|
+
ICFGEdge* ICFG::addConditionalIntraEdge(ICFGNode* srcNode, ICFGNode* dstNode, const Value* condition, s32_t branchCondVal){
|
|
356
356
|
|
|
357
357
|
checkIntraEdgeParents(srcNode, dstNode);
|
|
358
358
|
if(ICFGEdge* edge = hasIntraICFGEdge(srcNode,dstNode, ICFGEdge::IntraCF))
|
package/lib/MTA/MHP.cpp
CHANGED
|
@@ -1045,7 +1045,7 @@ static bool accessSameArrayIndex(const GetElementPtrInst* ptr1, const GetElement
|
|
|
1045
1045
|
{
|
|
1046
1046
|
if(ConstantInt* ci = SVFUtil::dyn_cast<ConstantInt>(gi.getOperand()))
|
|
1047
1047
|
{
|
|
1048
|
-
|
|
1048
|
+
s32_t idx = ci->getSExtValue();
|
|
1049
1049
|
ptr1vec.push_back(idx);
|
|
1050
1050
|
}
|
|
1051
1051
|
else
|
|
@@ -1058,7 +1058,7 @@ static bool accessSameArrayIndex(const GetElementPtrInst* ptr1, const GetElement
|
|
|
1058
1058
|
{
|
|
1059
1059
|
if(ConstantInt* ci = SVFUtil::dyn_cast<ConstantInt>(gi.getOperand()))
|
|
1060
1060
|
{
|
|
1061
|
-
|
|
1061
|
+
s32_t idx = ci->getSExtValue();
|
|
1062
1062
|
ptr2vec.push_back(idx);
|
|
1063
1063
|
}
|
|
1064
1064
|
else
|
|
@@ -108,14 +108,14 @@ u32_t LocationSet::getElementNum(const Type* type) const{
|
|
|
108
108
|
/// value1: i64 0 type1: [3 x i8]*
|
|
109
109
|
/// value2: i64 2 type2: [3 x i8]
|
|
110
110
|
/// accumulateConstantOffset = 2
|
|
111
|
-
|
|
111
|
+
s32_t LocationSet::accumulateConstantOffset() const{
|
|
112
112
|
|
|
113
113
|
assert(isConstantOffset() && "not a constant offset");
|
|
114
114
|
|
|
115
115
|
if(offsetValues.empty())
|
|
116
116
|
return accumulateConstantFieldIdx();
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
s32_t totalConstOffset = 0;
|
|
119
119
|
for(int i = offsetValues.size() - 1; i >= 0; i--){
|
|
120
120
|
const Value* value = offsetValues[i].first;
|
|
121
121
|
const Type* type = offsetValues[i].second;
|
|
@@ -129,7 +129,7 @@ s64_t LocationSet::accumulateConstantOffset() const{
|
|
|
129
129
|
if(const PointerType* pty = SVFUtil::dyn_cast<PointerType>(type))
|
|
130
130
|
totalConstOffset += op->getSExtValue() * getElementNum(pty->getElementType());
|
|
131
131
|
else{
|
|
132
|
-
|
|
132
|
+
s32_t offset = op->getSExtValue();
|
|
133
133
|
u32_t flattenOffset = SymbolTableInfo::SymbolInfo()->getFlattenedElemIdx(type, offset);
|
|
134
134
|
totalConstOffset += flattenOffset;
|
|
135
135
|
}
|
|
@@ -103,7 +103,7 @@ SVFIR* PAGBuilderFromFile::build()
|
|
|
103
103
|
{
|
|
104
104
|
NodeID nodeSrc;
|
|
105
105
|
NodeID nodeDst;
|
|
106
|
-
|
|
106
|
+
s32_t offsetOrCSId;
|
|
107
107
|
string edge;
|
|
108
108
|
istringstream ss(line);
|
|
109
109
|
ss >> nodeSrc;
|
|
@@ -144,7 +144,7 @@ SVFIR* PAGBuilderFromFile::build()
|
|
|
144
144
|
* Add SVFIR edge according to a file format
|
|
145
145
|
*/
|
|
146
146
|
void PAGBuilderFromFile::addEdge(NodeID srcID, NodeID dstID,
|
|
147
|
-
|
|
147
|
+
s32_t offsetOrCSId, std::string edge)
|
|
148
148
|
{
|
|
149
149
|
|
|
150
150
|
//check whether these two nodes available
|
|
@@ -559,7 +559,7 @@ NodeID SVFIR::getGepValVar(const Value* curInst, NodeID base, const LocationSet&
|
|
|
559
559
|
* Get a base SVFVar given a pointer
|
|
560
560
|
* Return the source node of its connected normal gep edge
|
|
561
561
|
* Otherwise return the node id itself
|
|
562
|
-
*
|
|
562
|
+
* s32_t offset : gep offset
|
|
563
563
|
*/
|
|
564
564
|
LocationSet SVFIR::getLocationSetFromBaseNode(NodeID nodeId)
|
|
565
565
|
{
|
|
@@ -200,7 +200,7 @@ void SymbolTableInfo::collectStructInfo(const StructType *sty)
|
|
|
200
200
|
sty->element_end(); it != ie; ++it)
|
|
201
201
|
{
|
|
202
202
|
const Type *et = *it;
|
|
203
|
-
/// offset with int_32 (
|
|
203
|
+
/// offset with int_32 (s32_t) is large enough and will not cause overflow
|
|
204
204
|
stinfo->addFldWithType(nf, et, strideOffset);
|
|
205
205
|
|
|
206
206
|
if (SVFUtil::isa<StructType>(et) || SVFUtil::isa<ArrayType>(et))
|
|
@@ -269,7 +269,7 @@ LocationSet SymbolTableInfo::getModulusOffset(const MemObj* obj, const LocationS
|
|
|
269
269
|
/// of current struct. Make the offset positive so we can still get a node within current
|
|
270
270
|
/// struct to represent this obj.
|
|
271
271
|
|
|
272
|
-
|
|
272
|
+
s32_t offset = ls.accumulateConstantFieldIdx();
|
|
273
273
|
if(offset < 0)
|
|
274
274
|
{
|
|
275
275
|
writeWrnMsg("try to create a gep node with negative offset.");
|
|
@@ -405,7 +405,7 @@ u32_t SymbolTableInfo::getNumOfFlattenElements(const Type *T)
|
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
/// Flatterned offset information of a struct or an array including its array fields
|
|
408
|
-
u32_t SymbolTableInfo::getFlattenedElemIdx(const Type *T,
|
|
408
|
+
u32_t SymbolTableInfo::getFlattenedElemIdx(const Type *T, u32_t origId)
|
|
409
409
|
{
|
|
410
410
|
if(Options::ModelArrays){
|
|
411
411
|
std::vector<u32_t>& so = getStructInfoIter(T)->second->getFlattenedElemIdxVec();
|
package/lib/SVF-FE/CPPUtil.cpp
CHANGED
|
@@ -55,7 +55,7 @@ const string structName = "struct.";
|
|
|
55
55
|
|
|
56
56
|
static bool isOperOverload(const string name)
|
|
57
57
|
{
|
|
58
|
-
|
|
58
|
+
u32_t leftnum = 0, rightnum = 0;
|
|
59
59
|
string subname = name;
|
|
60
60
|
size_t leftpos, rightpos;
|
|
61
61
|
leftpos = subname.find("<");
|
|
@@ -88,7 +88,7 @@ static string getBeforeParenthesis(const string &name)
|
|
|
88
88
|
size_t lastRightParen = name.rfind(")");
|
|
89
89
|
assert(lastRightParen > 0);
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
s32_t paren_num = 1, pos;
|
|
92
92
|
for (pos = lastRightParen - 1; pos >= 0; pos--)
|
|
93
93
|
{
|
|
94
94
|
if (name[pos] == ')')
|
|
@@ -107,7 +107,7 @@ string cppUtil::getBeforeBrackets(const string &name)
|
|
|
107
107
|
{
|
|
108
108
|
return name;
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
s32_t bracket_num = 1, pos;
|
|
111
111
|
for (pos = name.size() - 2; pos >= 0; pos--)
|
|
112
112
|
{
|
|
113
113
|
if (name[pos] == '>')
|
|
@@ -183,7 +183,7 @@ struct cppUtil::DemangledName cppUtil::demangle(const string &name)
|
|
|
183
183
|
struct cppUtil::DemangledName dname;
|
|
184
184
|
dname.isThunkFunc = false;
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
s32_t status;
|
|
187
187
|
char *realname = abi::__cxa_demangle(name.c_str(), 0, 0, &status);
|
|
188
188
|
if (realname == nullptr)
|
|
189
189
|
{
|
|
@@ -228,7 +228,7 @@ bool cppUtil::isLoadVtblInst(const LoadInst *loadInst)
|
|
|
228
228
|
const Value *loadSrc = loadInst->getPointerOperand();
|
|
229
229
|
const Type *valTy = loadSrc->getType();
|
|
230
230
|
const Type *elemTy = valTy;
|
|
231
|
-
for (
|
|
231
|
+
for (u32_t i = 0; i < 3; ++i)
|
|
232
232
|
{
|
|
233
233
|
if (const PointerType *ptrTy = SVFUtil::dyn_cast<PointerType>(elemTy))
|
|
234
234
|
elemTy = ptrTy->getElementType();
|
|
@@ -435,7 +435,7 @@ string cppUtil::getClassNameFromVtblObj(const Value *value)
|
|
|
435
435
|
string className = "";
|
|
436
436
|
|
|
437
437
|
string vtblName = value->getName().str();
|
|
438
|
-
|
|
438
|
+
s32_t status;
|
|
439
439
|
char *realname = abi::__cxa_demangle(vtblName.c_str(), 0, 0, &status);
|
|
440
440
|
if (realname != nullptr)
|
|
441
441
|
{
|
|
@@ -123,7 +123,7 @@ void ICFGBuilder::processFunBody(WorkList& worklist)
|
|
|
123
123
|
/// branch condition value
|
|
124
124
|
const ConstantInt* condVal = const_cast<SwitchInst*>(si)->findCaseDest(const_cast<BasicBlock*>(succ->getParent()));
|
|
125
125
|
/// default case is set to -1;
|
|
126
|
-
|
|
126
|
+
s32_t val = condVal ? condVal->getSExtValue() : -1;
|
|
127
127
|
icfg->addConditionalIntraEdge(srcNode, dstNode, si->getCondition(),val);
|
|
128
128
|
}
|
|
129
129
|
else
|
package/lib/SVF-FE/LLVMUtil.cpp
CHANGED
|
@@ -371,7 +371,7 @@ void SVFUtil::processArguments(int argc, char **argv, int &arg_num, char **arg_v
|
|
|
371
371
|
std::vector<std::string> &moduleNameVec)
|
|
372
372
|
{
|
|
373
373
|
bool first_ir_file = true;
|
|
374
|
-
for (
|
|
374
|
+
for (u32_t i = 0; i < argc; ++i)
|
|
375
375
|
{
|
|
376
376
|
std::string argument(argv[i]);
|
|
377
377
|
if (SVFUtil::isIRFile(argument))
|
|
@@ -219,7 +219,7 @@ void SVFIRBuilder::initialiseNodes()
|
|
|
219
219
|
e.g. field_idx = getelementptr i8, %struct_type %p, i64 1
|
|
220
220
|
|
|
221
221
|
*/
|
|
222
|
-
u32_t SVFIRBuilder::inferFieldIdxFromByteOffset(const llvm::GEPOperator* gepOp, DataLayout *dl, LocationSet& ls,
|
|
222
|
+
u32_t SVFIRBuilder::inferFieldIdxFromByteOffset(const llvm::GEPOperator* gepOp, DataLayout *dl, LocationSet& ls, s32_t idx){
|
|
223
223
|
return 0;
|
|
224
224
|
}
|
|
225
225
|
|
|
@@ -238,7 +238,7 @@ bool SVFIRBuilder::computeGepOffset(const User *V, LocationSet& ls)
|
|
|
238
238
|
llvm::APInt byteOffset(dataLayout->getIndexSizeInBits(gepOp->getPointerAddressSpace()),0,true);
|
|
239
239
|
if(gepOp && dataLayout && gepOp->accumulateConstantOffset(*dataLayout,byteOffset))
|
|
240
240
|
{
|
|
241
|
-
|
|
241
|
+
s32_t bo = byteOffset.getSExtValue();
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
for (bridge_gep_iterator gi = bridge_gep_begin(*V), ge = bridge_gep_end(*V);
|
|
@@ -256,7 +256,7 @@ bool SVFIRBuilder::computeGepOffset(const User *V, LocationSet& ls)
|
|
|
256
256
|
if(SVFUtil::isa<ArrayType>(gepTy)){
|
|
257
257
|
if(!op)
|
|
258
258
|
continue;
|
|
259
|
-
|
|
259
|
+
s32_t idx = op->getSExtValue();
|
|
260
260
|
u32_t offset = SymbolTableInfo::SymbolInfo()->getFlattenedElemIdx(gepTy, idx);
|
|
261
261
|
ls.setFldIdx(ls.accumulateConstantFieldIdx() + offset);
|
|
262
262
|
}
|
|
@@ -264,7 +264,7 @@ bool SVFIRBuilder::computeGepOffset(const User *V, LocationSet& ls)
|
|
|
264
264
|
{
|
|
265
265
|
assert(op && "non-const offset accessing a struct");
|
|
266
266
|
//The actual index
|
|
267
|
-
|
|
267
|
+
s32_t idx = op->getSExtValue();
|
|
268
268
|
u32_t offset = SymbolTableInfo::SymbolInfo()->getFlattenedElemIdx(ST, idx);
|
|
269
269
|
ls.setFldIdx(ls.accumulateConstantFieldIdx() + offset);
|
|
270
270
|
}
|
|
@@ -277,7 +277,7 @@ bool SVFIRBuilder::computeGepOffset(const User *V, LocationSet& ls)
|
|
|
277
277
|
return false;
|
|
278
278
|
|
|
279
279
|
// The actual index
|
|
280
|
-
//
|
|
280
|
+
//s32_t idx = op->getSExtValue();
|
|
281
281
|
|
|
282
282
|
// For pointer arithmetic we ignore the byte offset
|
|
283
283
|
// consider using inferFieldIdxFromByteOffset(geopOp,dataLayout,ls,idx)?
|
|
@@ -871,7 +871,7 @@ void SVFIRBuilder::visitSwitchInst(SwitchInst &inst){
|
|
|
871
871
|
const Instruction* succInst = &inst.getSuccessor(i)->front();
|
|
872
872
|
const ConstantInt* condVal = inst.findCaseDest(inst.getSuccessor(i));
|
|
873
873
|
/// default case is set to -1;
|
|
874
|
-
|
|
874
|
+
s32_t val = condVal ? condVal->getSExtValue() : -1;
|
|
875
875
|
const ICFGNode* icfgNode = pag->getICFG()->getICFGNode(succInst);
|
|
876
876
|
successors.push_back(std::make_pair(icfgNode,val));
|
|
877
877
|
}
|
|
@@ -977,7 +977,7 @@ const Value* SVFIRBuilder::getBaseValueForExtArg(const Value* V){
|
|
|
977
977
|
const Value * value = stripAllCasts(V);
|
|
978
978
|
assert(value && "null ptr?");
|
|
979
979
|
if(const GetElementPtrInst* gep = SVFUtil::dyn_cast<GetElementPtrInst>(value)){
|
|
980
|
-
|
|
980
|
+
s32_t totalidx = 0;
|
|
981
981
|
for (bridge_gep_iterator gi = bridge_gep_begin(gep), ge = bridge_gep_end(gep); gi != ge; ++gi){
|
|
982
982
|
if(const ConstantInt *op = SVFUtil::dyn_cast<ConstantInt>(gi.getOperand()))
|
|
983
983
|
totalidx += op->getSExtValue();
|
|
@@ -1124,7 +1124,14 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1124
1124
|
}
|
|
1125
1125
|
break;
|
|
1126
1126
|
}
|
|
1127
|
-
case ExtAPI::EFT_L_A0:
|
|
1127
|
+
case ExtAPI::EFT_L_A0: {
|
|
1128
|
+
NodeID dstNode = getValueNode(inst);
|
|
1129
|
+
Value *src= cs.getArgument(0);
|
|
1130
|
+
NodeID srcNode = getValueNode(src);
|
|
1131
|
+
addCopyEdge(srcNode, dstNode);
|
|
1132
|
+
break;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1128
1135
|
case ExtAPI::EFT_L_A1:
|
|
1129
1136
|
case ExtAPI::EFT_L_A2:
|
|
1130
1137
|
case ExtAPI::EFT_L_A8:
|
|
@@ -1315,7 +1322,7 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1315
1322
|
// We have vArg3 points to the entry of _Rb_tree_node_base { color; parent; left; right; }.
|
|
1316
1323
|
// Now we calculate the offset from base to vArg3
|
|
1317
1324
|
NodeID vnArg3 = pag->getValueNode(vArg3);
|
|
1318
|
-
|
|
1325
|
+
s32_t offset = pag->getLocationSetFromBaseNode(vnArg3).accumulateConstantFieldIdx();
|
|
1319
1326
|
|
|
1320
1327
|
// We get all flattened fields of base
|
|
1321
1328
|
vector<LocationSet> fields;
|
|
@@ -1342,7 +1349,7 @@ void SVFIRBuilder::handleExtCall(CallSite cs, const SVFFunction *callee)
|
|
|
1342
1349
|
|
|
1343
1350
|
Value *vArg = cs.getArgument(0);
|
|
1344
1351
|
NodeID vnArg = pag->getValueNode(vArg);
|
|
1345
|
-
|
|
1352
|
+
s32_t offset = pag->getLocationSetFromBaseNode(vnArg).accumulateConstantFieldIdx();
|
|
1346
1353
|
|
|
1347
1354
|
// We get all fields
|
|
1348
1355
|
vector<LocationSet> fields;
|
|
@@ -609,7 +609,7 @@ const Value* SymbolTableBuilder::getUniqueUseViaCastInst(const Value* val){
|
|
|
609
609
|
*/
|
|
610
610
|
void SymbolTableBuilder::initTypeInfo(ObjTypeInfo* typeinfo, const Value* val){
|
|
611
611
|
|
|
612
|
-
|
|
612
|
+
u32_t objSize = 1;
|
|
613
613
|
// Global variable
|
|
614
614
|
if (SVFUtil::isa<Function>(val))
|
|
615
615
|
{
|
package/lib/Util/Conditions.cpp
CHANGED
|
@@ -182,7 +182,7 @@ void CondManager::printModel()
|
|
|
182
182
|
z3::model m = sol.get_model();
|
|
183
183
|
for (u32_t i = 0; i < m.size(); i++)
|
|
184
184
|
{
|
|
185
|
-
z3::func_decl v = m[
|
|
185
|
+
z3::func_decl v = m[i];
|
|
186
186
|
SVFUtil::outs() << v.name() << " = " << m.get_const_interp(v) << "\n";
|
|
187
187
|
}
|
|
188
188
|
}
|
package/lib/Util/ExtAPI.cpp
CHANGED
|
@@ -709,6 +709,19 @@ static const ei_pair ei_pairs[]=
|
|
|
709
709
|
{"strrchr", ExtAPI::EFT_L_A0},
|
|
710
710
|
{"strstr", ExtAPI::EFT_L_A0},
|
|
711
711
|
{"tmpnam_r", ExtAPI::EFT_L_A0},
|
|
712
|
+
//cctype
|
|
713
|
+
{"isalnum", ExtAPI::EFT_L_A0},
|
|
714
|
+
{"isalpha", ExtAPI::EFT_L_A0},
|
|
715
|
+
{"isblank", ExtAPI::EFT_L_A0},
|
|
716
|
+
{"iscntrl", ExtAPI::EFT_L_A0},
|
|
717
|
+
{"isdigit", ExtAPI::EFT_L_A0},
|
|
718
|
+
{"isgraph", ExtAPI::EFT_L_A0},
|
|
719
|
+
{"islower", ExtAPI::EFT_L_A0},
|
|
720
|
+
{"isprint", ExtAPI::EFT_L_A0},
|
|
721
|
+
{"ispunct", ExtAPI::EFT_L_A0},
|
|
722
|
+
{"isspace", ExtAPI::EFT_L_A0},
|
|
723
|
+
{"isupper", ExtAPI::EFT_L_A0},
|
|
724
|
+
{"isxdigit", ExtAPI::EFT_L_A0},
|
|
712
725
|
{"asctime_r", ExtAPI::EFT_L_A1},
|
|
713
726
|
{"bsearch", ExtAPI::EFT_L_A1},
|
|
714
727
|
{"getmntent_r", ExtAPI::EFT_L_A1},
|
|
@@ -152,7 +152,7 @@ const NodeBS TypeBasedHeapCloning::getGepObjClones(NodeID base, unsigned offset)
|
|
|
152
152
|
|
|
153
153
|
// totalOffset is the offset from the real base (i.e. base of base),
|
|
154
154
|
// offset is the offset into base, whether it is a field itself or not.
|
|
155
|
-
|
|
155
|
+
s32_t totalOffset = offset;
|
|
156
156
|
if (const GepObjVar *baseGep = SVFUtil::dyn_cast<GepObjVar>(baseNode))
|
|
157
157
|
{
|
|
158
158
|
totalOffset += baseGep->getConstantFieldIdx();
|
package/lib/WPA/AndersenSFR.cpp
CHANGED
|
@@ -96,7 +96,7 @@ bool AndersenSFR::processGepPts(PointsTo& pts, const GepCGEdge* edge)
|
|
|
96
96
|
for (NodeID ptd : srcInits)
|
|
97
97
|
sortSrcInits.insert(ptd);
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
s32_t offset = SVFUtil::dyn_cast<NormalGepCGEdge>(edge)->getConstantFieldIdx();
|
|
100
100
|
fieldExpand(sortSrcInits, offset, dst->strides, tmpDstPts);
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -116,7 +116,7 @@ bool AndersenSFR::processGepPts(PointsTo& pts, const GepCGEdge* edge)
|
|
|
116
116
|
/*!
|
|
117
117
|
*
|
|
118
118
|
*/
|
|
119
|
-
void AndersenSFR::fieldExpand(NodeSet& initials,
|
|
119
|
+
void AndersenSFR::fieldExpand(NodeSet& initials, s32_t offset, NodeBS& strides, PointsTo& expandPts)
|
|
120
120
|
{
|
|
121
121
|
numOfFieldExpand++;
|
|
122
122
|
|
|
@@ -132,7 +132,7 @@ void AndersenSFR::fieldExpand(NodeSet& initials, s64_t offset, NodeBS& strides,
|
|
|
132
132
|
PAGNode* initPN = pag->getGNode(init);
|
|
133
133
|
const MemObj* obj = pag->getBaseObj(init);
|
|
134
134
|
const u32_t maxLimit = obj->getMaxFieldOffsetLimit();
|
|
135
|
-
|
|
135
|
+
s32_t initOffset;
|
|
136
136
|
if (GepObjVar *gepNode = SVFUtil::dyn_cast<GepObjVar>(initPN))
|
|
137
137
|
initOffset = gepNode->getConstantFieldIdx();
|
|
138
138
|
else if (SVFUtil::isa<FIObjVar>(initPN) || SVFUtil::isa<DummyObjVar>(initPN))
|
|
@@ -140,7 +140,7 @@ void AndersenSFR::fieldExpand(NodeSet& initials, s64_t offset, NodeBS& strides,
|
|
|
140
140
|
else
|
|
141
141
|
assert(false && "Not an object node!!");
|
|
142
142
|
|
|
143
|
-
Set<
|
|
143
|
+
Set<s32_t> offsets;
|
|
144
144
|
offsets.insert(offset);
|
|
145
145
|
|
|
146
146
|
// calculate offsets
|
|
@@ -151,7 +151,7 @@ void AndersenSFR::fieldExpand(NodeSet& initials, s64_t offset, NodeBS& strides,
|
|
|
151
151
|
for (auto _f : offsets)
|
|
152
152
|
for (auto _s : strides)
|
|
153
153
|
{
|
|
154
|
-
|
|
154
|
+
s32_t _f1 = _f + _s;
|
|
155
155
|
loopFlag = (offsets.find(_f1) == offsets.end()) && (initOffset + _f1 < maxLimit);
|
|
156
156
|
if (loopFlag)
|
|
157
157
|
offsets.insert(_f1);
|
|
@@ -159,7 +159,7 @@ void AndersenSFR::fieldExpand(NodeSet& initials, s64_t offset, NodeBS& strides,
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
// get gep objs
|
|
162
|
-
for (
|
|
162
|
+
for (s32_t _f : offsets)
|
|
163
163
|
{
|
|
164
164
|
NodeID gepId = consCG->getGepObjVar(init, LocationSet(_f));
|
|
165
165
|
initials.erase(gepId); // gep id in initials should be removed to avoid redundant derivation
|
package/lib/WPA/CSC.cpp
CHANGED
|
@@ -73,7 +73,7 @@ void CSC::find(NodeStack& candidates)
|
|
|
73
73
|
/*!
|
|
74
74
|
*
|
|
75
75
|
*/
|
|
76
|
-
void CSC::visit(NodeID nodeId,
|
|
76
|
+
void CSC::visit(NodeID nodeId, s32_t _w)
|
|
77
77
|
{
|
|
78
78
|
// pwcReps[nodeId] = _scc->repNode(nodeId);
|
|
79
79
|
setVisited(nodeId);
|
|
@@ -85,7 +85,7 @@ void CSC::visit(NodeID nodeId, s64_t _w)
|
|
|
85
85
|
ConstraintNode* node = _consG->getConstraintNode(nodeId);
|
|
86
86
|
for (ConstraintNode::const_iterator eit = node->directOutEdgeBegin(); eit != node->directOutEdgeEnd(); ++eit)
|
|
87
87
|
{
|
|
88
|
-
|
|
88
|
+
s32_t offset;
|
|
89
89
|
if (NormalGepCGEdge* gepCGEdge = SVFUtil::dyn_cast<NormalGepCGEdge>(*eit))
|
|
90
90
|
offset = gepCGEdge->getConstantFieldIdx();
|
|
91
91
|
else
|
|
@@ -107,8 +107,8 @@ void CSC::visit(NodeID nodeId, s64_t _w)
|
|
|
107
107
|
if (_consG->hasEdge(node, backNode, ConstraintEdge::NormalGep))
|
|
108
108
|
{
|
|
109
109
|
NormalGepCGEdge* normalGep = SVFUtil::dyn_cast<NormalGepCGEdge>(_consG->getEdge(node, backNode, ConstraintEdge::NormalGep));
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
s32_t _w = normalGep->getConstantFieldIdx();
|
|
111
|
+
s32_t _l = _D[nodeId] +_w - _D[backNodeId];
|
|
112
112
|
backNode->strides.set(_l);
|
|
113
113
|
for (auto cNodeId : _C)
|
|
114
114
|
_consG->getConstraintNode(cNodeId)->strides.set(_l);
|
|
@@ -116,7 +116,7 @@ void CSC::visit(NodeID nodeId, s64_t _w)
|
|
|
116
116
|
else if (_consG->hasEdge(node, backNode, ConstraintEdge::VariantGep) ||
|
|
117
117
|
_consG->hasEdge(node, backNode, ConstraintEdge::Copy))
|
|
118
118
|
{
|
|
119
|
-
|
|
119
|
+
s32_t _l = _D[nodeId] - _D[backNodeId];
|
|
120
120
|
backNode->strides.set(_l);
|
|
121
121
|
for (auto cNodeId : _C)
|
|
122
122
|
_consG->getConstraintNode(cNodeId)->strides.set(_l);
|
package/lib/WPA/TypeAnalysis.cpp
CHANGED
|
@@ -104,7 +104,7 @@ void TypeAnalysis::dumpCHAStats()
|
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
u32_t pure_abstract_class_num = 0,
|
|
108
108
|
multi_inheritance_class_num = 0;
|
|
109
109
|
for (CHGraph::const_iterator it = chgraph->begin(), eit = chgraph->end();
|
|
110
110
|
it != eit; ++it)
|
|
@@ -127,7 +127,7 @@ void TypeAnalysis::dumpCHAStats()
|
|
|
127
127
|
* vtbl max vfunction
|
|
128
128
|
* pure abstract class
|
|
129
129
|
*/
|
|
130
|
-
|
|
130
|
+
u32_t vtblnum = 0,
|
|
131
131
|
vfunc_total = 0,
|
|
132
132
|
vtbl_max = 0,
|
|
133
133
|
pure_abstract = 0;
|
|
@@ -139,7 +139,7 @@ void TypeAnalysis::dumpCHAStats()
|
|
|
139
139
|
if (node->isPureAbstract())
|
|
140
140
|
pure_abstract++;
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
u32_t vfuncs_size = 0;
|
|
143
143
|
const vector<CHNode::FuncVector>& vecs = node->getVirtualFunctionVectors();
|
|
144
144
|
for (vector<CHNode::FuncVector>::const_iterator vit = vecs.begin(),
|
|
145
145
|
veit = vecs.end(); vit != veit; ++vit)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.405",
|
|
4
4
|
"description": "* <b>[TypeClone](https://github.com/SVF-tools/SVF/wiki/TypeClone) published in our [ECOOP paper](https://yuleisui.github.io/publications/ecoop20.pdf) is now available in SVF </b> * <b>SVF now uses a single script for its build. Just type [`source ./build.sh`](https://github.com/SVF-tools/SVF/blob/master/build.sh) in your terminal, that's it!</b> * <b>SVF now supports LLVM-10.0.0! </b> * <b>We thank [bsauce](https://github.com/bsauce) for writing a user manual of SVF ([link1](https://www.jianshu.com/p/068a08ec749c) and [link2](https://www.jianshu.com/p/777c30d4240e)) in Chinese </b> * <b>SVF now supports LLVM-9.0.0 (Thank [Byoungyoung Lee](https://github.com/SVF-tools/SVF/issues/142) for his help!). </b> * <b>SVF now supports a set of [field-sensitive pointer analyses](https://yuleisui.github.io/publications/sas2019a.pdf). </b> * <b>[Use SVF as an external lib](https://github.com/SVF-tools/SVF/wiki/Using-SVF-as-a-lib-in-your-own-tool) for your own project (Contributed by [Hongxu Chen](https://github.com/HongxuChen)). </b> * <b>SVF now supports LLVM-7.0.0. </b> * <b>SVF now supports Docker. [Try SVF in Docker](https://github.com/SVF-tools/SVF/wiki/Try-SVF-in-Docker)! </b> * <b>SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). </b> * <b>SVF now supports [LLVM-4.0.0](https://github.com/svf-tools/SVF/pull/23) (Contributed by Jared Carlson. Thank [Jared](https://github.com/jcarlson23) and [Will](https://github.com/dtzWill) for their in-depth [discussions](https://github.com/svf-tools/SVF/pull/18) about updating SVF!) </b> * <b>SVF now supports analysis for C++ programs.</b> <br />",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|