svf-tools 1.0.310 → 1.0.314
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/AndersenHCD_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/AndersenHLCD_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/AndersenLCD_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/AndersenSCD_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/AndersenSFR_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/AndersenSFR_8h_source.html +6 -6
- package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +21 -21
- package/SVF-doxygen/html/html/AndersenWaveDiffWithType_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/AndersenWaveDiff_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/Andersen_8cpp.html +1 -0
- package/SVF-doxygen/html/html/Andersen_8cpp_source.html +58 -56
- package/SVF-doxygen/html/html/Andersen_8h_source.html +118 -118
- package/SVF-doxygen/html/html/CHG_8cpp.html +3 -3
- package/SVF-doxygen/html/html/CHG_8cpp_source.html +49 -50
- package/SVF-doxygen/html/html/CHG_8h_source.html +3 -3
- package/SVF-doxygen/html/html/CPPUtil_8cpp_source.html +17 -16
- package/SVF-doxygen/html/html/CPPUtil_8h_source.html +16 -16
- package/SVF-doxygen/html/html/CallGraphBuilder_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/CallGraphBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ConsGNode_8h_source.html +5 -5
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +10 -10
- package/SVF-doxygen/html/html/ConsG_8h_source.html +7 -7
- package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/ContextDDA_8h_source.html +5 -5
- package/SVF-doxygen/html/html/DCHG_8cpp_source.html +13 -13
- package/SVF-doxygen/html/html/DCHG_8h_source.html +2 -2
- package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/DDAClient_8h_source.html +2 -2
- package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/DDAPass_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DDAStat_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +10 -10
- package/SVF-doxygen/html/html/DoubleFreeChecker_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ExternalPAG_8cpp.html +1 -1
- package/SVF-doxygen/html/html/ExternalPAG_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/ExternalPAG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/FSMPTA_8cpp_source.html +10 -10
- package/SVF-doxygen/html/html/FSMPTA_8h_source.html +1 -1
- package/SVF-doxygen/html/html/FileChecker_8h_source.html +1 -1
- package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/FlowDDA_8h_source.html +3 -3
- package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/FlowSensitiveTBHC_8cpp_source.html +11 -11
- package/SVF-doxygen/html/html/FlowSensitive_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/FlowSensitive_8h_source.html +5 -5
- package/SVF-doxygen/html/html/GenericGraph_8h_source.html +82 -81
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ICFGNode_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ICFGStat_8h_source.html +3 -3
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/ICFG_8h_source.html +6 -6
- package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +4 -4
- package/SVF-doxygen/html/html/LLVMModule_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/LLVMModule_8h_source.html +2 -2
- package/SVF-doxygen/html/html/LLVMUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LLVMUtil_8h_source.html +4 -4
- package/SVF-doxygen/html/html/LeakChecker_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LeakChecker_8h_source.html +1 -1
- package/SVF-doxygen/html/html/LocationSet_8h_source.html +1 -2
- package/SVF-doxygen/html/html/LockAnalysis_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/LockResultValidator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MHP_8cpp_source.html +13 -13
- package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/MTAAnnotator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MTAResultValidator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAResultValidator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MTAStat_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/MTA_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/MTA_8h_source.html +1 -1
- package/SVF-doxygen/html/html/MemModelBuilder_8cpp.html +90 -0
- package/SVF-doxygen/html/html/MemModelBuilder_8cpp_source.html +205 -0
- package/SVF-doxygen/html/html/MemModelBuilder_8h.html +97 -0
- package/SVF-doxygen/html/html/MemModelBuilder_8h_source.html +105 -0
- package/SVF-doxygen/html/html/MemModel_8cpp_source.html +9 -53
- package/SVF-doxygen/html/html/MemModel_8h_source.html +44 -44
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +17 -17
- package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/NodeIDAllocator_8cpp_source.html +13 -13
- package/SVF-doxygen/html/html/NodeIDAllocator_8h_source.html +12 -12
- package/SVF-doxygen/html/html/OfflineConsG_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/Options_8cpp_source.html +1 -2
- package/SVF-doxygen/html/html/Options_8h_source.html +2 -2
- package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PAGBuilder_8cpp_source.html +25 -25
- package/SVF-doxygen/html/html/PAGBuilder_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PAGEdge_8h_source.html +2 -2
- package/SVF-doxygen/html/html/PAGNode_8h_source.html +11 -11
- package/SVF-doxygen/html/html/PAG_8cpp_source.html +34 -34
- package/SVF-doxygen/html/html/PAG_8h_source.html +41 -41
- package/SVF-doxygen/html/html/PCG_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/PCG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PTACallGraph_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/PTACallGraph_8h_source.html +2 -2
- package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +24 -24
- package/SVF-doxygen/html/html/PTAType_8h_source.html +4 -4
- package/SVF-doxygen/html/html/PathCondAllocator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PathCondAllocator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PersistentPointsToCache_8h_source.html +34 -33
- package/SVF-doxygen/html/html/PersistentPointsToDS_8h_source.html +7 -7
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +15 -15
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +66 -66
- package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +15 -15
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +7 -7
- package/SVF-doxygen/html/html/ProgSlice_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/SVFGBuilder_8cpp_source.html +4 -4
- package/SVF-doxygen/html/html/SVFGNode_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFGOPT_8cpp_source.html +10 -10
- package/SVF-doxygen/html/html/SVFGOPT_8h_source.html +8 -8
- package/SVF-doxygen/html/html/SVFGStat_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/SVFG_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/SVFG_8h_source.html +7 -7
- package/SVF-doxygen/html/html/SVFModule_8cpp.html +1 -1
- package/SVF-doxygen/html/html/SVFModule_8cpp_source.html +6 -5
- package/SVF-doxygen/html/html/SVFModule_8h.html +3 -0
- package/SVF-doxygen/html/html/SVFModule_8h_source.html +53 -46
- package/SVF-doxygen/html/html/SaberAnnotator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/SrcSnkDDA_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/SrcSnkDDA_8h_source.html +1 -1
- package/SVF-doxygen/html/html/Steensgaard_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/Steensgaard_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +5 -55
- package/SVF-doxygen/html/html/SymbolTableInfo_8h.html +0 -4
- package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +88 -101
- package/SVF-doxygen/html/html/TCT_8cpp_source.html +11 -11
- package/SVF-doxygen/html/html/TCT_8h_source.html +10 -10
- package/SVF-doxygen/html/html/ThreadAPI_8cpp_source.html +5 -5
- package/SVF-doxygen/html/html/ThreadAPI_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/TypeAnalysis_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8h_source.html +2 -2
- package/SVF-doxygen/html/html/VFGNode_8h_source.html +2 -2
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/VFG_8h_source.html +6 -6
- package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +7 -7
- package/SVF-doxygen/html/html/VersionedFlowSensitive_8cpp_source.html +13 -13
- package/SVF-doxygen/html/html/WPAPass_8cpp_source.html +11 -11
- package/SVF-doxygen/html/html/WPAPass_8h_source.html +1 -1
- package/SVF-doxygen/html/html/annotated.html +135 -136
- 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 +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1AddrPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AddrVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AliasDDAClient.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1Andersen-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Andersen.html +228 -228
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenBase.html +60 -58
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHCD.html +43 -43
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenHLCD.html +23 -23
- package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenLCD.html +52 -52
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSCD.html +38 -38
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +17 -17
- package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +31 -31
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiff.html +38 -38
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiffWithType-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenWaveDiffWithType.html +31 -31
- package/SVF-doxygen/html/html/classSVF_1_1ArgumentVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +73 -72
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CHGraph-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CHGraph.html +123 -120
- package/SVF-doxygen/html/html/classSVF_1_1CallBlockNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CallGraphBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneDummyObjPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneFIObjPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CloneGepObjPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CmpPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CmpVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +115 -115
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +15 -15
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintNode.html +18 -18
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +13 -13
- package/SVF-doxygen/html/html/classSVF_1_1CopyPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CopyVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DCHGraph.html +22 -22
- package/SVF-doxygen/html/html/classSVF_1_1DDAClient.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1DDAStat.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1DummyObjPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DummyValPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ExternalPAG.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1FIObjPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FSMPTA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +44 -44
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +24 -24
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveTBHC.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1ForkJoinAnalysis.html +5 -5
- 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_1FunEntryBlockNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FunExitBlockNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FunptrDDAClient.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1GenericGraph.html +47 -47
- package/SVF-doxygen/html/html/classSVF_1_1GenericNode.html +58 -57
- package/SVF-doxygen/html/html/classSVF_1_1GepObjPN.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1GepPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepValPN.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GlobalBlockNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +13 -13
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1ICFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1ICFGStat.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1IRAnnotator.html +3 -3
- 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_1IntraBlockNode.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_1LLVMModuleSet.html +17 -17
- package/SVF-doxygen/html/html/classSVF_1_1LeakChecker.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1LoadPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LoadVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LocObjTypeInfo.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LocSymTableInfo.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LockAnalysis.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1LockResultValidator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MHP.html +15 -15
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +24 -24
- 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_1MTA.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MTAResultValidator.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1MTASVFGBuilder.html +21 -21
- package/SVF-doxygen/html/html/classSVF_1_1MTAStat.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1MemModelBuilder-members.html +95 -0
- package/SVF-doxygen/html/html/classSVF_1_1MemModelBuilder.html +711 -0
- package/SVF-doxygen/html/html/classSVF_1_1MemObj-members.html +7 -10
- package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +92 -199
- package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1NodeIDAllocator-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1NodeIDAllocator.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1NodeIDAllocator_1_1Clusterer.html +34 -34
- package/SVF-doxygen/html/html/classSVF_1_1NullPtrVFGNode.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1ObjPN.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo-members.html +8 -10
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +68 -168
- package/SVF-doxygen/html/html/classSVF_1_1Options-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Options.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1PAG.html +67 -67
- package/SVF-doxygen/html/html/classSVF_1_1PAGBuilder.html +41 -41
- package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1PAGEdge.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1PAGNode.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1PCG.html +15 -15
- package/SVF-doxygen/html/html/classSVF_1_1PHIVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PTACallGraph.html +16 -16
- package/SVF-doxygen/html/html/classSVF_1_1PTACallGraphNode.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +32 -32
- package/SVF-doxygen/html/html/classSVF_1_1PersistentDFPTData.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1PersistentDiffPTData.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1PersistentPTData.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1PersistentPointsToCache-members.html +39 -38
- package/SVF-doxygen/html/html/classSVF_1_1PersistentPointsToCache.html +153 -116
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +21 -21
- package/SVF-doxygen/html/html/classSVF_1_1ProgSlice.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1RaceResultValidator.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1RetBlockNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1RetPN.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFG.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1SVFGBuilder.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFGOPT.html +35 -35
- package/SVF-doxygen/html/html/classSVF_1_1SVFGStat.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1SVFModule-members.html +1 -0
- package/SVF-doxygen/html/html/classSVF_1_1SVFModule.html +113 -80
- package/SVF-doxygen/html/html/classSVF_1_1SaberAnnotator.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +16 -16
- package/SVF-doxygen/html/html/classSVF_1_1SrcSnkDDA.html +5 -5
- package/SVF-doxygen/html/html/classSVF_1_1Steensgaard-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1Steensgaard.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1StmtVFGNode.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1StorePE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StoreVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo-members.html +49 -55
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +300 -587
- package/SVF-doxygen/html/html/classSVF_1_1TCT.html +28 -28
- package/SVF-doxygen/html/html/classSVF_1_1TCTNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadAPI.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraphBuilder.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TypeAnalysis.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1TypeSystem.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPPE.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPVFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1VFGNode.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ValPN.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1VarArgPN.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive.html +35 -35
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitive_1_1SCC.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1WPAPass.html +11 -11
- package/SVF-doxygen/html/html/classes.html +91 -91
- package/SVF-doxygen/html/html/dda_8cpp.html +1 -1
- package/SVF-doxygen/html/html/dda_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/dir_5840dc76920ee0f379cd88b55fa041fd.html +1 -1
- package/SVF-doxygen/html/html/dir_770a542efe75a1b68c109cb4e4290224.html +1 -1
- package/SVF-doxygen/html/html/files.html +2 -2
- package/SVF-doxygen/html/html/functions_0x7e.html +5 -8
- package/SVF-doxygen/html/html/functions_a.html +13 -10
- package/SVF-doxygen/html/html/functions_b.html +1 -1
- package/SVF-doxygen/html/html/functions_c.html +38 -36
- package/SVF-doxygen/html/html/functions_e.html +1 -1
- package/SVF-doxygen/html/html/functions_f.html +3 -3
- package/SVF-doxygen/html/html/functions_func.html +12 -9
- package/SVF-doxygen/html/html/functions_func_0x7e.html +5 -8
- package/SVF-doxygen/html/html/functions_func_b.html +1 -1
- package/SVF-doxygen/html/html/functions_func_c.html +28 -26
- package/SVF-doxygen/html/html/functions_func_e.html +1 -1
- package/SVF-doxygen/html/html/functions_func_g.html +11 -13
- package/SVF-doxygen/html/html/functions_func_h.html +3 -3
- package/SVF-doxygen/html/html/functions_func_i.html +8 -7
- package/SVF-doxygen/html/html/functions_func_l.html +2 -8
- package/SVF-doxygen/html/html/functions_func_m.html +4 -1
- package/SVF-doxygen/html/html/functions_func_p.html +1 -1
- package/SVF-doxygen/html/html/functions_func_s.html +8 -5
- package/SVF-doxygen/html/html/functions_func_v.html +0 -3
- package/SVF-doxygen/html/html/functions_g.html +6 -8
- package/SVF-doxygen/html/html/functions_h.html +3 -3
- package/SVF-doxygen/html/html/functions_i.html +15 -14
- package/SVF-doxygen/html/html/functions_l.html +6 -10
- package/SVF-doxygen/html/html/functions_m.html +5 -1
- package/SVF-doxygen/html/html/functions_n.html +4 -4
- package/SVF-doxygen/html/html/functions_o.html +3 -3
- package/SVF-doxygen/html/html/functions_p.html +13 -9
- package/SVF-doxygen/html/html/functions_r.html +1 -1
- package/SVF-doxygen/html/html/functions_rela.html +3 -0
- package/SVF-doxygen/html/html/functions_s.html +20 -14
- package/SVF-doxygen/html/html/functions_t.html +4 -4
- package/SVF-doxygen/html/html/functions_u.html +3 -3
- package/SVF-doxygen/html/html/functions_v.html +2 -5
- package/SVF-doxygen/html/html/functions_vars_l.html +1 -1
- package/SVF-doxygen/html/html/functions_vars_s.html +2 -1
- package/SVF-doxygen/html/html/functions_w.html +3 -1
- package/SVF-doxygen/html/html/hierarchy.html +127 -128
- package/SVF-doxygen/html/html/mta_8cpp.html +1 -1
- package/SVF-doxygen/html/html/mta_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/namespaceSVF.html +1 -3
- package/SVF-doxygen/html/html/namespaceSVF_1_1SVFUtil.html +1 -1
- package/SVF-doxygen/html/html/namespaceSVF_1_1cppUtil.html +40 -39
- package/SVF-doxygen/html/html/saber_8cpp.html +1 -1
- package/SVF-doxygen/html/html/saber_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/search/all_1.js +3 -2
- package/SVF-doxygen/html/html/search/all_10.js +9 -9
- package/SVF-doxygen/html/html/search/all_12.js +2 -2
- package/SVF-doxygen/html/html/search/all_13.js +9 -8
- package/SVF-doxygen/html/html/search/all_14.js +6 -6
- package/SVF-doxygen/html/html/search/all_15.js +2 -2
- package/SVF-doxygen/html/html/search/all_16.js +0 -1
- package/SVF-doxygen/html/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/html/search/all_1b.js +3 -4
- package/SVF-doxygen/html/html/search/all_2.js +1 -1
- package/SVF-doxygen/html/html/search/all_3.js +11 -10
- package/SVF-doxygen/html/html/search/all_5.js +1 -1
- package/SVF-doxygen/html/html/search/all_6.js +1 -1
- package/SVF-doxygen/html/html/search/all_7.js +2 -2
- package/SVF-doxygen/html/html/search/all_8.js +3 -3
- package/SVF-doxygen/html/html/search/all_9.js +4 -3
- package/SVF-doxygen/html/html/search/all_c.js +4 -7
- package/SVF-doxygen/html/html/search/all_d.js +4 -1
- package/SVF-doxygen/html/html/search/all_e.js +2 -2
- package/SVF-doxygen/html/html/search/all_f.js +1 -1
- package/SVF-doxygen/html/html/search/classes_9.js +1 -3
- package/SVF-doxygen/html/html/search/classes_a.js +1 -0
- package/SVF-doxygen/html/html/search/files_8.js +1 -3
- package/SVF-doxygen/html/html/search/files_9.js +2 -0
- package/SVF-doxygen/html/html/search/functions_0.js +3 -2
- package/SVF-doxygen/html/html/search/functions_1.js +1 -1
- package/SVF-doxygen/html/html/search/functions_10.js +1 -0
- package/SVF-doxygen/html/html/search/functions_13.js +0 -1
- package/SVF-doxygen/html/html/search/functions_16.js +3 -4
- package/SVF-doxygen/html/html/search/functions_2.js +10 -9
- package/SVF-doxygen/html/html/search/functions_4.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +2 -2
- package/SVF-doxygen/html/html/search/functions_7.js +3 -3
- package/SVF-doxygen/html/html/search/functions_8.js +2 -1
- package/SVF-doxygen/html/html/search/functions_a.js +1 -3
- package/SVF-doxygen/html/html/search/functions_b.js +2 -1
- package/SVF-doxygen/html/html/search/functions_e.js +1 -1
- package/SVF-doxygen/html/html/search/related_3.js +1 -0
- package/SVF-doxygen/html/html/search/variables_13.js +1 -1
- package/SVF-doxygen/html/html/search/variables_14.js +2 -2
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_c.js +1 -1
- package/SVF-doxygen/html/html/search/variables_e.js +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01CHGraph_01_5_01_4.html +12 -12
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ConstraintGraph_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01OfflineConsG_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01PAG_01_5_01_4.html +17 -17
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01SVFG_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01TCT_01_5_01_4.html +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01Inverse_3_01SVF_1_1GenericNode_3_01NodeTy_00_01EdgeTy_01_4_01_5_4_01_4.html +14 -14
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1GenericGraph_3_01NodeTy_00_01EdgeTy_01_4_01_5_4.html +20 -20
- package/SVF-doxygen/html/html/structllvm_1_1GraphTraits_3_01SVF_1_1GenericNode_3_01NodeTy_00_01EdgeTy_01_4_01_5_01_4.html +16 -16
- package/SVF-doxygen/html/html/svf-ex_8cpp.html +8 -7
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +6 -5
- package/SVF-doxygen/html/html/wpa_8cpp.html +1 -1
- package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
- package/include/Graphs/GenericGraph.h +5 -8
- package/include/MemoryModel/MemModel.h +5 -21
- package/include/MemoryModel/PersistentPointsToCache.h +13 -7
- package/include/MemoryModel/PointerAnalysisImpl.h +1 -0
- package/include/SVF-FE/CHG.h +1 -1
- package/include/SVF-FE/MemModelBuilder.h +102 -0
- package/include/SVF-FE/SymbolTableInfo.h +12 -79
- package/include/Util/NodeIDAllocator.h +1 -1
- package/include/Util/SVFModule.h +16 -0
- package/include/WPA/Andersen.h +2 -7
- package/lib/Graphs/PAG.cpp +3 -10
- package/lib/MemoryModel/MemModel.cpp +10 -436
- package/lib/SVF-FE/CHG.cpp +0 -6
- package/lib/SVF-FE/CPPUtil.cpp +2 -0
- package/lib/SVF-FE/MemModelBuilder.cpp +616 -0
- package/lib/SVF-FE/SymbolTableInfo.cpp +10 -453
- package/lib/Util/NodeIDAllocator.cpp +2 -1
- package/lib/Util/Options.cpp +2 -10
- package/lib/Util/SVFModule.cpp +3 -2
- package/lib/WPA/Andersen.cpp +13 -1
- package/package.json +1 -1
- package/tools/Example/svf-ex.cpp +6 -3
- package/include/SVF-FE/LocMemModel.h +0 -35
- package/lib/SVF-FE/LocMemModel.cpp +0 -31
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
//===- LocMemModel.cpp -- Memory model builder---------------------//
|
|
2
|
+
//
|
|
3
|
+
// SVF: Static Value-Flow Analysis
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) <2013-2017> <Yulei Sui>
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
// This program is free software: you can redistribute it and/or modify
|
|
9
|
+
// it under the terms of the GNU General Public License as published by
|
|
10
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
// (at your option) any later version.
|
|
12
|
+
|
|
13
|
+
// This program is distributed in the hope that it will be useful,
|
|
14
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
// GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
// You should have received a copy of the GNU General Public License
|
|
19
|
+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
//
|
|
21
|
+
//===----------------------------------------------------------------------===//
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* MemModelBuilder.cpp
|
|
25
|
+
*
|
|
26
|
+
* Created on: Apr 28, 2014
|
|
27
|
+
* Author: Yulei Sui
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#include <memory>
|
|
31
|
+
|
|
32
|
+
#include "SVF-FE/MemModelBuilder.h"
|
|
33
|
+
#include "SVF-FE/SymbolTableInfo.h"
|
|
34
|
+
#include "MemoryModel/MemModel.h"
|
|
35
|
+
#include "Util/NodeIDAllocator.h"
|
|
36
|
+
#include "Util/Options.h"
|
|
37
|
+
#include "Util/SVFModule.h"
|
|
38
|
+
#include "Util/SVFUtil.h"
|
|
39
|
+
#include "SVF-FE/LLVMUtil.h"
|
|
40
|
+
#include "SVF-FE/CPPUtil.h"
|
|
41
|
+
#include "SVF-FE/GEPTypeBridgeIterator.h" // include bridge_gep_iterator
|
|
42
|
+
|
|
43
|
+
using namespace SVF;
|
|
44
|
+
using namespace SVFUtil;
|
|
45
|
+
|
|
46
|
+
/*!
|
|
47
|
+
* This method identify which is value sym and which is object sym
|
|
48
|
+
*/
|
|
49
|
+
void MemModelBuilder::buildMemModel(SVFModule* svfModule)
|
|
50
|
+
{
|
|
51
|
+
SVFUtil::increaseStackSize();
|
|
52
|
+
|
|
53
|
+
symInfo->setModule(svfModule);
|
|
54
|
+
|
|
55
|
+
StInfo::setMaxFieldLimit(Options::MaxFieldLimit);
|
|
56
|
+
|
|
57
|
+
// Object #0 is black hole the object that may point to any object
|
|
58
|
+
assert(symInfo->totalSymNum == BlackHole && "Something changed!");
|
|
59
|
+
symInfo->symTyMap.insert(std::make_pair(symInfo->totalSymNum++, BlackHole));
|
|
60
|
+
symInfo->createBlkOrConstantObj(BlackHole);
|
|
61
|
+
|
|
62
|
+
// Object #1 always represents the constant
|
|
63
|
+
assert(symInfo->totalSymNum == ConstantObj && "Something changed!");
|
|
64
|
+
symInfo->symTyMap.insert(std::make_pair(symInfo->totalSymNum++, ConstantObj));
|
|
65
|
+
symInfo->createBlkOrConstantObj(ConstantObj);
|
|
66
|
+
|
|
67
|
+
// Pointer #2 always represents the pointer points-to black hole.
|
|
68
|
+
assert(symInfo->totalSymNum == BlkPtr && "Something changed!");
|
|
69
|
+
symInfo->symTyMap.insert(std::make_pair(symInfo->totalSymNum++, BlkPtr));
|
|
70
|
+
|
|
71
|
+
// Pointer #3 always represents the null pointer.
|
|
72
|
+
assert(symInfo->totalSymNum == NullPtr && "Something changed!");
|
|
73
|
+
symInfo->symTyMap.insert(std::make_pair(symInfo->totalSymNum, NullPtr));
|
|
74
|
+
|
|
75
|
+
// Add symbols for all the globals .
|
|
76
|
+
for (SVFModule::global_iterator I = svfModule->global_begin(), E =
|
|
77
|
+
svfModule->global_end(); I != E; ++I)
|
|
78
|
+
{
|
|
79
|
+
collectSym(*I);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Add symbols for all the global aliases
|
|
83
|
+
for (SVFModule::alias_iterator I = svfModule->alias_begin(), E =
|
|
84
|
+
svfModule->alias_end(); I != E; I++)
|
|
85
|
+
{
|
|
86
|
+
collectSym(*I);
|
|
87
|
+
collectSym((*I)->getAliasee());
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Add symbols for all of the functions and the instructions in them.
|
|
91
|
+
for (SVFModule::llvm_iterator F = svfModule->llvmFunBegin(), E = svfModule->llvmFunEnd(); F != E; ++F)
|
|
92
|
+
{
|
|
93
|
+
Function *fun = *F;
|
|
94
|
+
collectSym(fun);
|
|
95
|
+
collectRet(fun);
|
|
96
|
+
if (fun->getFunctionType()->isVarArg())
|
|
97
|
+
collectVararg(fun);
|
|
98
|
+
|
|
99
|
+
// Add symbols for all formal parameters.
|
|
100
|
+
for (Function::arg_iterator I = fun->arg_begin(), E = fun->arg_end();
|
|
101
|
+
I != E; ++I)
|
|
102
|
+
{
|
|
103
|
+
collectSym(&*I);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// collect and create symbols inside the function body
|
|
107
|
+
for (inst_iterator II = inst_begin(*fun), E = inst_end(*fun); II != E; ++II)
|
|
108
|
+
{
|
|
109
|
+
const Instruction *inst = &*II;
|
|
110
|
+
collectSym(inst);
|
|
111
|
+
|
|
112
|
+
// initialization for some special instructions
|
|
113
|
+
//{@
|
|
114
|
+
if (const StoreInst *st = SVFUtil::dyn_cast<StoreInst>(inst))
|
|
115
|
+
{
|
|
116
|
+
collectSym(st->getPointerOperand());
|
|
117
|
+
collectSym(st->getValueOperand());
|
|
118
|
+
}
|
|
119
|
+
else if (const LoadInst *ld = SVFUtil::dyn_cast<LoadInst>(inst))
|
|
120
|
+
{
|
|
121
|
+
collectSym(ld->getPointerOperand());
|
|
122
|
+
}
|
|
123
|
+
else if (const PHINode *phi = SVFUtil::dyn_cast<PHINode>(inst))
|
|
124
|
+
{
|
|
125
|
+
for (u32_t i = 0; i < phi->getNumIncomingValues(); ++i)
|
|
126
|
+
{
|
|
127
|
+
collectSym(phi->getIncomingValue(i));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else if (const GetElementPtrInst *gep = SVFUtil::dyn_cast<GetElementPtrInst>(
|
|
131
|
+
inst))
|
|
132
|
+
{
|
|
133
|
+
collectSym(gep->getPointerOperand());
|
|
134
|
+
}
|
|
135
|
+
else if (const SelectInst *sel = SVFUtil::dyn_cast<SelectInst>(inst))
|
|
136
|
+
{
|
|
137
|
+
collectSym(sel->getTrueValue());
|
|
138
|
+
collectSym(sel->getFalseValue());
|
|
139
|
+
}
|
|
140
|
+
else if (const BinaryOperator *binary = SVFUtil::dyn_cast<BinaryOperator>(inst))
|
|
141
|
+
{
|
|
142
|
+
for (u32_t i = 0; i < binary->getNumOperands(); i++)
|
|
143
|
+
collectSym(binary->getOperand(i));
|
|
144
|
+
}
|
|
145
|
+
else if (const UnaryOperator *unary = SVFUtil::dyn_cast<UnaryOperator>(inst))
|
|
146
|
+
{
|
|
147
|
+
for (u32_t i = 0; i < unary->getNumOperands(); i++)
|
|
148
|
+
collectSym(unary->getOperand(i));
|
|
149
|
+
}
|
|
150
|
+
else if (const CmpInst *cmp = SVFUtil::dyn_cast<CmpInst>(inst))
|
|
151
|
+
{
|
|
152
|
+
for (u32_t i = 0; i < cmp->getNumOperands(); i++)
|
|
153
|
+
collectSym(cmp->getOperand(i));
|
|
154
|
+
}
|
|
155
|
+
else if (const CastInst *cast = SVFUtil::dyn_cast<CastInst>(inst))
|
|
156
|
+
{
|
|
157
|
+
collectSym(cast->getOperand(0));
|
|
158
|
+
}
|
|
159
|
+
else if (const ReturnInst *ret = SVFUtil::dyn_cast<ReturnInst>(inst))
|
|
160
|
+
{
|
|
161
|
+
if(ret->getReturnValue())
|
|
162
|
+
collectSym(ret->getReturnValue());
|
|
163
|
+
}
|
|
164
|
+
else if (const BranchInst *br = SVFUtil::dyn_cast<BranchInst>(inst))
|
|
165
|
+
{
|
|
166
|
+
Value* opnd = br->isConditional() ? br->getCondition() : br->getOperand(0);
|
|
167
|
+
collectSym(opnd);
|
|
168
|
+
}
|
|
169
|
+
else if (const SwitchInst *sw = SVFUtil::dyn_cast<SwitchInst>(inst))
|
|
170
|
+
{
|
|
171
|
+
collectSym(sw->getCondition());
|
|
172
|
+
}
|
|
173
|
+
else if (isNonInstricCallSite(inst))
|
|
174
|
+
{
|
|
175
|
+
|
|
176
|
+
CallSite cs = SVFUtil::getLLVMCallSite(inst);
|
|
177
|
+
symInfo->callSiteSet.insert(cs);
|
|
178
|
+
for (CallSite::arg_iterator it = cs.arg_begin();
|
|
179
|
+
it != cs.arg_end(); ++it)
|
|
180
|
+
{
|
|
181
|
+
collectSym(*it);
|
|
182
|
+
}
|
|
183
|
+
// Calls to inline asm need to be added as well because the callee isn't
|
|
184
|
+
// referenced anywhere else.
|
|
185
|
+
const Value *Callee = cs.getCalledValue();
|
|
186
|
+
collectSym(Callee);
|
|
187
|
+
|
|
188
|
+
//TODO handle inlineAsm
|
|
189
|
+
///if (SVFUtil::isa<InlineAsm>(Callee))
|
|
190
|
+
|
|
191
|
+
}
|
|
192
|
+
//@}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
symInfo->totalSymNum = NodeIDAllocator::get()->endSymbolAllocation();
|
|
197
|
+
if (Options::SymTabPrint) {
|
|
198
|
+
SymbolTableInfo::SymbolInfo()->dump();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/*!
|
|
203
|
+
* Collect symbols, including value and object syms
|
|
204
|
+
*/
|
|
205
|
+
void MemModelBuilder::collectSym(const Value *val)
|
|
206
|
+
{
|
|
207
|
+
|
|
208
|
+
//TODO: filter the non-pointer type // if (!SVFUtil::isa<PointerType>(val->getType())) return;
|
|
209
|
+
|
|
210
|
+
DBOUT(DMemModel, outs() << "collect sym from ##" << *val << " \n");
|
|
211
|
+
|
|
212
|
+
// special sym here
|
|
213
|
+
if (symInfo->isNullPtrSym(val) || symInfo->isBlackholeSym(val))
|
|
214
|
+
return;
|
|
215
|
+
|
|
216
|
+
//TODO handle constant expression value here??
|
|
217
|
+
handleCE(val);
|
|
218
|
+
|
|
219
|
+
// create a value sym
|
|
220
|
+
collectVal(val);
|
|
221
|
+
|
|
222
|
+
// create an object If it is a heap, stack, global, function.
|
|
223
|
+
if (isObject(val))
|
|
224
|
+
{
|
|
225
|
+
collectObj(val);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/*!
|
|
230
|
+
* Get value sym, if not available create a new one
|
|
231
|
+
*/
|
|
232
|
+
void MemModelBuilder::collectVal(const Value *val)
|
|
233
|
+
{
|
|
234
|
+
SymbolTableInfo::ValueToIDMapTy::iterator iter = symInfo->valSymMap.find(val);
|
|
235
|
+
if (iter == symInfo->valSymMap.end())
|
|
236
|
+
{
|
|
237
|
+
// create val sym and sym type
|
|
238
|
+
SymID id = NodeIDAllocator::get()->allocateValueId();
|
|
239
|
+
symInfo->valSymMap.insert(std::make_pair(val, id));
|
|
240
|
+
symInfo->symTyMap.insert(std::make_pair(id, ValSym));
|
|
241
|
+
DBOUT(DMemModel,
|
|
242
|
+
outs() << "create a new value sym " << id << "\n");
|
|
243
|
+
/// handle global constant expression here
|
|
244
|
+
if (const GlobalVariable* globalVar = SVFUtil::dyn_cast<GlobalVariable>(val))
|
|
245
|
+
handleGlobalCE(globalVar);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
if (symInfo->isConstantObjSym(val))
|
|
249
|
+
collectObj(val);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/*!
|
|
253
|
+
* Get memory object sym, if not available create a new one
|
|
254
|
+
*/
|
|
255
|
+
void MemModelBuilder::collectObj(const Value *val)
|
|
256
|
+
{
|
|
257
|
+
val = symInfo->getGlobalRep(val);
|
|
258
|
+
SymbolTableInfo::ValueToIDMapTy::iterator iter = symInfo->objSymMap.find(val);
|
|
259
|
+
if (iter == symInfo->objSymMap.end())
|
|
260
|
+
{
|
|
261
|
+
// if the object pointed by the pointer is a constant data (e.g., i32 0) or a global constant object (e.g. string)
|
|
262
|
+
// then we treat them as one ConstantObj
|
|
263
|
+
if(isConstantData(val) || (symInfo->isConstantObjSym(val) && !symInfo->getModelConstants()))
|
|
264
|
+
{
|
|
265
|
+
symInfo->objSymMap.insert(std::make_pair(val, symInfo->constantSymID()));
|
|
266
|
+
}
|
|
267
|
+
// otherwise, we will create an object for each abstract memory location
|
|
268
|
+
else
|
|
269
|
+
{
|
|
270
|
+
// create obj sym and sym type
|
|
271
|
+
SymID id = NodeIDAllocator::get()->allocateObjectId();
|
|
272
|
+
symInfo->objSymMap.insert(std::make_pair(val, id));
|
|
273
|
+
symInfo->symTyMap.insert(std::make_pair(id, ObjSym));
|
|
274
|
+
DBOUT(DMemModel,
|
|
275
|
+
outs() << "create a new obj sym " << id << "\n");
|
|
276
|
+
|
|
277
|
+
// create a memory object
|
|
278
|
+
MemObj* mem = new MemObj(id, createObjTypeInfo(val), val);
|
|
279
|
+
assert(symInfo->objMap.find(id) == symInfo->objMap.end());
|
|
280
|
+
symInfo->objMap[id] = mem;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/*!
|
|
286
|
+
* Create unique return sym, if not available create a new one
|
|
287
|
+
*/
|
|
288
|
+
void MemModelBuilder::collectRet(const Function *val)
|
|
289
|
+
{
|
|
290
|
+
SymbolTableInfo::FunToIDMapTy::iterator iter = symInfo->returnSymMap.find(val);
|
|
291
|
+
if (iter == symInfo->returnSymMap.end())
|
|
292
|
+
{
|
|
293
|
+
SymID id = NodeIDAllocator::get()->allocateValueId();
|
|
294
|
+
symInfo->returnSymMap.insert(std::make_pair(val, id));
|
|
295
|
+
symInfo->symTyMap.insert(std::make_pair(id, RetSym));
|
|
296
|
+
DBOUT(DMemModel,
|
|
297
|
+
outs() << "create a return sym " << id << "\n");
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/*!
|
|
302
|
+
* Create vararg sym, if not available create a new one
|
|
303
|
+
*/
|
|
304
|
+
void MemModelBuilder::collectVararg(const Function *val)
|
|
305
|
+
{
|
|
306
|
+
SymbolTableInfo::FunToIDMapTy::iterator iter = symInfo->varargSymMap.find(val);
|
|
307
|
+
if (iter == symInfo->varargSymMap.end())
|
|
308
|
+
{
|
|
309
|
+
SymID id = NodeIDAllocator::get()->allocateValueId();
|
|
310
|
+
symInfo->varargSymMap.insert(std::make_pair(val, id));
|
|
311
|
+
symInfo->symTyMap.insert(std::make_pair(id, VarargSym));
|
|
312
|
+
DBOUT(DMemModel,
|
|
313
|
+
outs() << "create a vararg sym " << id << "\n");
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
/*!
|
|
319
|
+
* Handle constant expression
|
|
320
|
+
*/
|
|
321
|
+
void MemModelBuilder::handleCE(const Value *val)
|
|
322
|
+
{
|
|
323
|
+
if (const Constant* ref = SVFUtil::dyn_cast<Constant>(val))
|
|
324
|
+
{
|
|
325
|
+
if (const ConstantExpr* ce = isGepConstantExpr(ref))
|
|
326
|
+
{
|
|
327
|
+
DBOUT(DMemModelCE,
|
|
328
|
+
outs() << "handle constant expression " << *ref << "\n");
|
|
329
|
+
collectVal(ce);
|
|
330
|
+
collectVal(ce->getOperand(0));
|
|
331
|
+
// handle the recursive constant express case
|
|
332
|
+
// like (gep (bitcast (gep X 1)) 1); the inner gep is ce->getOperand(0)
|
|
333
|
+
handleCE(ce->getOperand(0));
|
|
334
|
+
}
|
|
335
|
+
else if (const ConstantExpr* ce = isCastConstantExpr(ref))
|
|
336
|
+
{
|
|
337
|
+
DBOUT(DMemModelCE,
|
|
338
|
+
outs() << "handle constant expression " << *ref << "\n");
|
|
339
|
+
collectVal(ce);
|
|
340
|
+
collectVal(ce->getOperand(0));
|
|
341
|
+
// handle the recursive constant express case
|
|
342
|
+
// like (gep (bitcast (gep X 1)) 1); the inner gep is ce->getOperand(0)
|
|
343
|
+
handleCE(ce->getOperand(0));
|
|
344
|
+
}
|
|
345
|
+
else if (const ConstantExpr* ce = isSelectConstantExpr(ref))
|
|
346
|
+
{
|
|
347
|
+
DBOUT(DMemModelCE,
|
|
348
|
+
outs() << "handle constant expression " << *ref << "\n");
|
|
349
|
+
collectVal(ce);
|
|
350
|
+
collectVal(ce->getOperand(0));
|
|
351
|
+
collectVal(ce->getOperand(1));
|
|
352
|
+
collectVal(ce->getOperand(2));
|
|
353
|
+
// handle the recursive constant express case
|
|
354
|
+
// like (gep (bitcast (gep X 1)) 1); the inner gep is ce->getOperand(0)
|
|
355
|
+
handleCE(ce->getOperand(0));
|
|
356
|
+
handleCE(ce->getOperand(1));
|
|
357
|
+
handleCE(ce->getOperand(2));
|
|
358
|
+
}
|
|
359
|
+
// if we meet a int2ptr, then it points-to black hole
|
|
360
|
+
else if (const ConstantExpr *int2Ptrce = isInt2PtrConstantExpr(ref)) {
|
|
361
|
+
collectVal(int2Ptrce);
|
|
362
|
+
} else if (const ConstantExpr *ptr2Intce = isPtr2IntConstantExpr(ref)) {
|
|
363
|
+
collectVal(ptr2Intce);
|
|
364
|
+
const Constant *opnd = ptr2Intce->getOperand(0);
|
|
365
|
+
handleCE(opnd);
|
|
366
|
+
} else if (isTruncConstantExpr(ref) || isCmpConstantExpr(ref)) {
|
|
367
|
+
collectVal(ref);
|
|
368
|
+
} else if (isBinaryConstantExpr(ref)) {
|
|
369
|
+
collectVal(ref);
|
|
370
|
+
} else if (isUnaryConstantExpr(ref)) {
|
|
371
|
+
// we don't handle unary constant expression like fneg(x) now
|
|
372
|
+
collectVal(ref);
|
|
373
|
+
} else if (SVFUtil::isa<ConstantAggregate>(ref)) {
|
|
374
|
+
// we don't handle constant agrgregate like constant vectors
|
|
375
|
+
collectVal(ref);
|
|
376
|
+
} else {
|
|
377
|
+
if (SVFUtil::isa<ConstantExpr>(val))
|
|
378
|
+
assert(false && "we don't handle all other constant expression for now!");
|
|
379
|
+
collectVal(ref);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/*!
|
|
385
|
+
* Handle global constant expression
|
|
386
|
+
*/
|
|
387
|
+
void MemModelBuilder::handleGlobalCE(const GlobalVariable *G)
|
|
388
|
+
{
|
|
389
|
+
assert(G);
|
|
390
|
+
|
|
391
|
+
//The type this global points to
|
|
392
|
+
const Type *T = G->getType()->getContainedType(0);
|
|
393
|
+
bool is_array = 0;
|
|
394
|
+
//An array is considered a single variable of its type.
|
|
395
|
+
while (const ArrayType *AT = SVFUtil::dyn_cast<ArrayType>(T))
|
|
396
|
+
{
|
|
397
|
+
T = AT->getElementType();
|
|
398
|
+
is_array = 1;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
if (SVFUtil::isa<StructType>(T))
|
|
402
|
+
{
|
|
403
|
+
//A struct may be used in constant GEP expr.
|
|
404
|
+
for (Value::const_user_iterator it = G->user_begin(), ie = G->user_end();
|
|
405
|
+
it != ie; ++it)
|
|
406
|
+
{
|
|
407
|
+
handleCE(*it);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
else
|
|
411
|
+
{
|
|
412
|
+
if (is_array)
|
|
413
|
+
{
|
|
414
|
+
for (Value::const_user_iterator it = G->user_begin(), ie =
|
|
415
|
+
G->user_end(); it != ie; ++it)
|
|
416
|
+
{
|
|
417
|
+
handleCE(*it);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if (G->hasInitializer())
|
|
423
|
+
{
|
|
424
|
+
handleGlobalInitializerCE(G->getInitializer(), 0);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/*!
|
|
429
|
+
* Handle global variable initialization
|
|
430
|
+
*/
|
|
431
|
+
void MemModelBuilder::handleGlobalInitializerCE(const Constant *C,
|
|
432
|
+
u32_t offset)
|
|
433
|
+
{
|
|
434
|
+
|
|
435
|
+
if (C->getType()->isSingleValueType())
|
|
436
|
+
{
|
|
437
|
+
if (const ConstantExpr *E = SVFUtil::dyn_cast<ConstantExpr>(C))
|
|
438
|
+
{
|
|
439
|
+
handleCE(E);
|
|
440
|
+
}
|
|
441
|
+
else
|
|
442
|
+
{
|
|
443
|
+
collectVal(C);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
else if (SVFUtil::isa<ConstantArray>(C))
|
|
447
|
+
{
|
|
448
|
+
for (u32_t i = 0, e = C->getNumOperands(); i != e; i++)
|
|
449
|
+
{
|
|
450
|
+
handleGlobalInitializerCE(SVFUtil::cast<Constant>(C->getOperand(i)), offset);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
else if (SVFUtil::isa<ConstantStruct>(C))
|
|
454
|
+
{
|
|
455
|
+
const StructType *sty = SVFUtil::cast<StructType>(C->getType());
|
|
456
|
+
const std::vector<u32_t>& offsetvect =
|
|
457
|
+
SymbolTableInfo::SymbolInfo()->getFattenFieldIdxVec(sty);
|
|
458
|
+
for (u32_t i = 0, e = C->getNumOperands(); i != e; i++)
|
|
459
|
+
{
|
|
460
|
+
u32_t off = offsetvect[i];
|
|
461
|
+
handleGlobalInitializerCE(SVFUtil::cast<Constant>(C->getOperand(i)),
|
|
462
|
+
offset + off);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/*
|
|
468
|
+
* Initial the memory object here
|
|
469
|
+
*/
|
|
470
|
+
ObjTypeInfo* MemModelBuilder::createObjTypeInfo(const Value *val)
|
|
471
|
+
{
|
|
472
|
+
const PointerType *refTy = nullptr;
|
|
473
|
+
|
|
474
|
+
const Instruction *I = SVFUtil::dyn_cast<Instruction>(val);
|
|
475
|
+
|
|
476
|
+
// We consider two types of objects:
|
|
477
|
+
// (1) A heap/static object from a callsite
|
|
478
|
+
if (I && isNonInstricCallSite(I))
|
|
479
|
+
refTy = getRefTypeOfHeapAllocOrStatic(I);
|
|
480
|
+
// (2) Other objects (e.g., alloca, global, etc.)
|
|
481
|
+
else
|
|
482
|
+
refTy = SVFUtil::dyn_cast<PointerType>(val->getType());
|
|
483
|
+
|
|
484
|
+
if (refTy)
|
|
485
|
+
{
|
|
486
|
+
Type *objTy = refTy->getElementType();
|
|
487
|
+
ObjTypeInfo* typeInfo = new ObjTypeInfo(val, objTy, Options::MaxFieldLimit);
|
|
488
|
+
initTypeInfo(typeInfo,val);
|
|
489
|
+
return typeInfo;
|
|
490
|
+
}
|
|
491
|
+
else
|
|
492
|
+
{
|
|
493
|
+
writeWrnMsg("try to create an object with a non-pointer type.");
|
|
494
|
+
writeWrnMsg(val->getName().str());
|
|
495
|
+
writeWrnMsg("(" + getSourceLoc(val) + ")");
|
|
496
|
+
assert(false && "Memory object must be held by a pointer-typed ref value.");
|
|
497
|
+
abort();
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
/*!
|
|
503
|
+
* Analyse types of all flattened fields of this object
|
|
504
|
+
*/
|
|
505
|
+
void MemModelBuilder::analyzeGlobalStackObjType(ObjTypeInfo* typeinfo, const Value* val)
|
|
506
|
+
{
|
|
507
|
+
|
|
508
|
+
const PointerType * refty = SVFUtil::dyn_cast<PointerType>(val->getType());
|
|
509
|
+
assert(SVFUtil::isa<PointerType>(refty) && "this value should be a pointer type!");
|
|
510
|
+
Type* elemTy = refty->getElementType();
|
|
511
|
+
bool isPtrObj = false;
|
|
512
|
+
// Find the inter nested array element
|
|
513
|
+
while (const ArrayType *AT= SVFUtil::dyn_cast<ArrayType>(elemTy))
|
|
514
|
+
{
|
|
515
|
+
elemTy = AT->getElementType();
|
|
516
|
+
if(elemTy->isPointerTy())
|
|
517
|
+
isPtrObj = true;
|
|
518
|
+
if(SVFUtil::isa<GlobalVariable>(val) && SVFUtil::cast<GlobalVariable>(val)->hasInitializer()
|
|
519
|
+
&& SVFUtil::isa<ConstantArray>(SVFUtil::cast<GlobalVariable>(val)->getInitializer()))
|
|
520
|
+
{
|
|
521
|
+
typeinfo->setFlag(ObjTypeInfo::CONST_ARRAY_OBJ);
|
|
522
|
+
}
|
|
523
|
+
else
|
|
524
|
+
typeinfo->setFlag(ObjTypeInfo::VAR_ARRAY_OBJ);
|
|
525
|
+
}
|
|
526
|
+
if (const StructType *ST= SVFUtil::dyn_cast<StructType>(elemTy))
|
|
527
|
+
{
|
|
528
|
+
const std::vector<FieldInfo>& flattenFields = SymbolTableInfo::SymbolInfo()->getFlattenFieldInfoVec(ST);
|
|
529
|
+
for(std::vector<FieldInfo>::const_iterator it = flattenFields.begin(), eit = flattenFields.end();
|
|
530
|
+
it!=eit; ++it)
|
|
531
|
+
{
|
|
532
|
+
if((*it).getFlattenElemTy()->isPointerTy())
|
|
533
|
+
isPtrObj = true;
|
|
534
|
+
}
|
|
535
|
+
if(SVFUtil::isa<GlobalVariable>(val) && SVFUtil::cast<GlobalVariable>(val)->hasInitializer()
|
|
536
|
+
&& SVFUtil::isa<ConstantStruct>(SVFUtil::cast<GlobalVariable>(val)->getInitializer()))
|
|
537
|
+
typeinfo->setFlag(ObjTypeInfo::CONST_STRUCT_OBJ);
|
|
538
|
+
else
|
|
539
|
+
typeinfo->setFlag(ObjTypeInfo::VAR_STRUCT_OBJ);
|
|
540
|
+
}
|
|
541
|
+
else if (elemTy->isPointerTy())
|
|
542
|
+
{
|
|
543
|
+
isPtrObj = true;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
if(isPtrObj)
|
|
547
|
+
typeinfo->setFlag(ObjTypeInfo::HASPTR_OBJ);
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/*!
|
|
551
|
+
* Initialize the type info of an object
|
|
552
|
+
*/
|
|
553
|
+
void MemModelBuilder::initTypeInfo(ObjTypeInfo* typeinfo, const Value* val){
|
|
554
|
+
|
|
555
|
+
Size_t objSize = 1;
|
|
556
|
+
// Global variable
|
|
557
|
+
if (SVFUtil::isa<Function>(val))
|
|
558
|
+
{
|
|
559
|
+
typeinfo->setFlag(ObjTypeInfo::FUNCTION_OBJ);
|
|
560
|
+
analyzeGlobalStackObjType(typeinfo,val);
|
|
561
|
+
objSize = getObjSize(val);
|
|
562
|
+
}
|
|
563
|
+
else if(SVFUtil::isa<AllocaInst>(val))
|
|
564
|
+
{
|
|
565
|
+
typeinfo->setFlag(ObjTypeInfo::STACK_OBJ);
|
|
566
|
+
analyzeGlobalStackObjType(typeinfo,val);
|
|
567
|
+
objSize = getObjSize(val);
|
|
568
|
+
}
|
|
569
|
+
else if(SVFUtil::isa<GlobalVariable>(val))
|
|
570
|
+
{
|
|
571
|
+
typeinfo->setFlag(ObjTypeInfo::GLOBVAR_OBJ);
|
|
572
|
+
if(SymbolTableInfo::SymbolInfo()->isConstantObjSym(val))
|
|
573
|
+
typeinfo->setFlag(ObjTypeInfo::CONST_OBJ);
|
|
574
|
+
analyzeGlobalStackObjType(typeinfo,val);
|
|
575
|
+
objSize = getObjSize(val);
|
|
576
|
+
}
|
|
577
|
+
else if (SVFUtil::isa<Instruction>(val) && isHeapAllocExtCall(SVFUtil::cast<Instruction>(val)))
|
|
578
|
+
{
|
|
579
|
+
typeinfo->analyzeHeapObjType(val->getType());
|
|
580
|
+
// Heap object, label its field as infinite here
|
|
581
|
+
objSize = -1;
|
|
582
|
+
}
|
|
583
|
+
else if (SVFUtil::isa<Instruction>(val) && isStaticExtCall(SVFUtil::cast<Instruction>(val)))
|
|
584
|
+
{
|
|
585
|
+
typeinfo->analyzeStaticObjType(val->getType());
|
|
586
|
+
// static object allocated before main, label its field as infinite here
|
|
587
|
+
objSize = -1;
|
|
588
|
+
}
|
|
589
|
+
else if(ArgInProgEntryFunction(val))
|
|
590
|
+
{
|
|
591
|
+
typeinfo->analyzeStaticObjType(val->getType());
|
|
592
|
+
// user input data, label its field as infinite here
|
|
593
|
+
objSize = -1;
|
|
594
|
+
}
|
|
595
|
+
else
|
|
596
|
+
assert("what other object do we have??");
|
|
597
|
+
|
|
598
|
+
// Reset maxOffsetLimit if it is over the total fieldNum of this object
|
|
599
|
+
if(objSize > 0 && typeinfo->getMaxFieldOffsetLimit() > objSize)
|
|
600
|
+
typeinfo->setMaxFieldOffsetLimit(objSize);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/*!
|
|
604
|
+
* Return size of this Object
|
|
605
|
+
*/
|
|
606
|
+
u32_t MemModelBuilder::getObjSize(const Value* val)
|
|
607
|
+
{
|
|
608
|
+
|
|
609
|
+
Type* ety = SVFUtil::cast<PointerType>(val->getType())->getElementType();
|
|
610
|
+
u32_t numOfFields = 1;
|
|
611
|
+
if (SVFUtil::isa<StructType>(ety) || SVFUtil::isa<ArrayType>(ety))
|
|
612
|
+
{
|
|
613
|
+
numOfFields = SymbolTableInfo::SymbolInfo()->getFlattenFieldInfoVec(ety).size();
|
|
614
|
+
}
|
|
615
|
+
return numOfFields;
|
|
616
|
+
}
|