svf-tools 1.0.406 → 1.0.409
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 +1 -1
- package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ConsG_8h_source.html +1 -1
- package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +4 -4
- package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/LLVMUtil_8cpp_source.html +15 -11
- package/SVF-doxygen/html/html/LLVMUtil_8h.html +3 -0
- package/SVF-doxygen/html/html/LLVMUtil_8h_source.html +20 -19
- package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/MemSSA_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +11 -11
- package/SVF-doxygen/html/html/PathCondAllocator_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +4 -4
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +9 -9
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SVFVariables_8h_source.html +1 -1
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +32 -33
- package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +5 -5
- package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +53 -52
- package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +49 -49
- package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1MemObj-members.html +29 -28
- package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +91 -69
- package/SVF-doxygen/html/html/classSVF_1_1MemSSA.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +97 -97
- package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +11 -11
- package/SVF-doxygen/html/html/classSVF_1_1PathCondAllocator.html +6 -6
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StInfo.html +36 -36
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder-members.html +7 -8
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +50 -78
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +24 -24
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +1 -1
- 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/functions_func_g.html +12 -14
- package/SVF-doxygen/html/html/functions_g.html +12 -14
- package/SVF-doxygen/html/html/functions_i.html +4 -4
- package/SVF-doxygen/html/html/functions_l.html +5 -5
- package/SVF-doxygen/html/html/functions_p.html +7 -7
- package/SVF-doxygen/html/html/functions_r.html +1 -1
- package/SVF-doxygen/html/html/functions_s.html +14 -14
- package/SVF-doxygen/html/html/functions_t.html +3 -1
- package/SVF-doxygen/html/html/functions_v.html +6 -6
- package/SVF-doxygen/html/html/globals_r.html +3 -3
- package/SVF-doxygen/html/html/globals_s.html +5 -7
- 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_1_1SVFUtil.html +73 -41
- package/SVF-doxygen/html/html/namespacemembers_func.html +4 -1
- package/SVF-doxygen/html/html/namespacemembers_g.html +3 -0
- 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_10.js +6 -6
- package/SVF-doxygen/html/html/search/all_12.js +2 -2
- package/SVF-doxygen/html/html/search/all_13.js +13 -13
- package/SVF-doxygen/html/html/search/all_14.js +3 -3
- package/SVF-doxygen/html/html/search/all_16.js +3 -3
- package/SVF-doxygen/html/html/search/all_7.js +3 -3
- package/SVF-doxygen/html/html/search/all_9.js +2 -2
- package/SVF-doxygen/html/html/search/all_c.js +3 -3
- package/SVF-doxygen/html/html/search/all_e.js +4 -4
- package/SVF-doxygen/html/html/search/functions_10.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +3 -3
- package/SVF-doxygen/html/html/search/functions_8.js +1 -1
- package/SVF-doxygen/html/html/search/variables_14.js +2 -2
- package/SVF-doxygen/html/html/search/variables_e.js +3 -3
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +16 -16
- package/SVF-doxygen/html/html/svf-ex_8cpp.html +1 -1
- package/SVF-doxygen/html/html/svf-ex_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/wpa_8cpp.html +1 -1
- package/SVF-doxygen/html/html/wpa_8cpp_source.html +1 -1
- package/include/MemoryModel/SymbolTableInfo.h +4 -1
- package/include/SVF-FE/LLVMUtil.h +3 -0
- package/include/SVF-FE/SymbolTableBuilder.h +1 -3
- package/lib/Graphs/ICFG.cpp +24 -21
- package/lib/MemoryModel/SymbolTableInfo.cpp +6 -11
- package/lib/SVF-FE/LLVMUtil.cpp +21 -4
- package/lib/SVF-FE/SymbolTableBuilder.cpp +16 -30
- package/package.json +1 -1
|
@@ -584,42 +584,29 @@ void SymbolTableBuilder::analyzeStaticObjType(ObjTypeInfo* typeinfo, const Value
|
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
|
|
587
|
-
/*
|
|
588
|
-
* Get the first dominated cast instruction for heap allocations since they typically come from void* (i8*)
|
|
589
|
-
* for example, %4 = call align 16 i8* @malloc(i64 10); %5 = bitcast i8* %4 to i32*
|
|
590
|
-
* return %5 whose type is i32* but not %4 whose type is i8*
|
|
591
|
-
*/
|
|
592
|
-
const Value* SymbolTableBuilder::getUniqueUseViaCastInst(const Value* val){
|
|
593
|
-
const PointerType * type = SVFUtil::dyn_cast<PointerType>(val->getType());
|
|
594
|
-
assert(type && "this value should be a pointer type!");
|
|
595
|
-
/// If type is void* (i8*) and val is only used at a bitcast instruction
|
|
596
|
-
if (IntegerType *IT = SVFUtil::dyn_cast<IntegerType>(type->getPointerElementType())){
|
|
597
|
-
if (IT->getBitWidth() == 8 && val->getNumUses()==1){
|
|
598
|
-
const Use *u = &*val->use_begin();
|
|
599
|
-
return SVFUtil::dyn_cast<BitCastInst>(u->getUser());
|
|
600
|
-
}
|
|
601
|
-
}
|
|
602
|
-
return nullptr;
|
|
603
|
-
}
|
|
604
|
-
|
|
605
587
|
/*!
|
|
606
588
|
* Initialize the type info of an object
|
|
607
589
|
*/
|
|
608
590
|
void SymbolTableBuilder::initTypeInfo(ObjTypeInfo* typeinfo, const Value* val){
|
|
609
591
|
|
|
610
|
-
|
|
592
|
+
u32_t objSize = 1;
|
|
611
593
|
// Global variable
|
|
612
594
|
if (SVFUtil::isa<Function>(val))
|
|
613
595
|
{
|
|
614
596
|
typeinfo->setFlag(ObjTypeInfo::FUNCTION_OBJ);
|
|
615
597
|
analyzeObjType(typeinfo,val);
|
|
616
|
-
objSize = getObjSize(
|
|
598
|
+
objSize = getObjSize(typeinfo->getType());
|
|
617
599
|
}
|
|
618
|
-
else if(SVFUtil::
|
|
600
|
+
else if(const AllocaInst* allocaInst = SVFUtil::dyn_cast<AllocaInst>(val))
|
|
619
601
|
{
|
|
620
602
|
typeinfo->setFlag(ObjTypeInfo::STACK_OBJ);
|
|
621
603
|
analyzeObjType(typeinfo,val);
|
|
622
|
-
|
|
604
|
+
/// This is for `alloca <ty> <NumElements>`. For example, `alloca i64 3` allocates 3 i64 on the stack (objSize=3)
|
|
605
|
+
/// In most cases, `NumElements` is not specified in the instruction, which means there is only one element (objSize=1).
|
|
606
|
+
if(const ConstantInt *sz = SVFUtil::dyn_cast<ConstantInt>(allocaInst->getArraySize()))
|
|
607
|
+
objSize = sz->getZExtValue() * getObjSize(typeinfo->getType());
|
|
608
|
+
else
|
|
609
|
+
objSize = getObjSize(typeinfo->getType());
|
|
623
610
|
}
|
|
624
611
|
else if(SVFUtil::isa<GlobalVariable>(val))
|
|
625
612
|
{
|
|
@@ -627,25 +614,25 @@ void SymbolTableBuilder::initTypeInfo(ObjTypeInfo* typeinfo, const Value* val){
|
|
|
627
614
|
if(SymbolTableInfo::SymbolInfo()->isConstantObjSym(val))
|
|
628
615
|
typeinfo->setFlag(ObjTypeInfo::CONST_GLOBAL_OBJ);
|
|
629
616
|
analyzeObjType(typeinfo,val);
|
|
630
|
-
objSize = getObjSize(
|
|
617
|
+
objSize = getObjSize(typeinfo->getType());
|
|
631
618
|
}
|
|
632
619
|
else if (SVFUtil::isa<Instruction>(val) && isHeapAllocExtCall(SVFUtil::cast<Instruction>(val)))
|
|
633
620
|
{
|
|
634
621
|
analyzeHeapObjType(typeinfo,val);
|
|
635
622
|
// Heap object, label its field as infinite here
|
|
636
|
-
objSize =
|
|
623
|
+
objSize = typeinfo->getMaxFieldOffsetLimit();
|
|
637
624
|
}
|
|
638
625
|
else if (SVFUtil::isa<Instruction>(val) && isStaticExtCall(SVFUtil::cast<Instruction>(val)))
|
|
639
626
|
{
|
|
640
627
|
analyzeStaticObjType(typeinfo,val);
|
|
641
628
|
// static object allocated before main, label its field as infinite here
|
|
642
|
-
objSize =
|
|
629
|
+
objSize = typeinfo->getMaxFieldOffsetLimit();
|
|
643
630
|
}
|
|
644
631
|
else if(ArgInProgEntryFunction(val))
|
|
645
632
|
{
|
|
646
633
|
analyzeStaticObjType(typeinfo,val);
|
|
647
634
|
// user input data, label its field as infinite here
|
|
648
|
-
objSize =
|
|
635
|
+
objSize = typeinfo->getMaxFieldOffsetLimit();
|
|
649
636
|
}
|
|
650
637
|
else if(SVFUtil::isConstantData(val))
|
|
651
638
|
{
|
|
@@ -658,17 +645,16 @@ void SymbolTableBuilder::initTypeInfo(ObjTypeInfo* typeinfo, const Value* val){
|
|
|
658
645
|
}
|
|
659
646
|
|
|
660
647
|
// Reset maxOffsetLimit if it is over the total fieldNum of this object
|
|
661
|
-
if(
|
|
648
|
+
if(typeinfo->getMaxFieldOffsetLimit() > objSize)
|
|
662
649
|
typeinfo->setNumOfElements(objSize);
|
|
663
650
|
}
|
|
664
651
|
|
|
665
652
|
/*!
|
|
666
653
|
* Return size of this Object
|
|
667
654
|
*/
|
|
668
|
-
u32_t SymbolTableBuilder::getObjSize(const
|
|
655
|
+
u32_t SymbolTableBuilder::getObjSize(const Type* ety)
|
|
669
656
|
{
|
|
670
|
-
|
|
671
|
-
Type* ety = SVFUtil::cast<PointerType>(val->getType())->getElementType();
|
|
657
|
+
assert(ety && "type is null?");
|
|
672
658
|
u32_t numOfFields = 1;
|
|
673
659
|
if (SVFUtil::isa<StructType>(ety) || SVFUtil::isa<ArrayType>(ety))
|
|
674
660
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.409",
|
|
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": {
|