svf-tools 1.0.405 → 1.0.406
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 +2 -2
- package/SVF-doxygen/html/html/CHGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
- package/SVF-doxygen/html/html/ContextDDA_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/DDAVFSolver_8h_source.html +6 -6
- package/SVF-doxygen/html/html/FlowDDA_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/FlowSensitiveStat_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8h_source.html +16 -16
- package/SVF-doxygen/html/html/LLVMUtil_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/LocationSet_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PTAStat_8cpp_source.html +16 -16
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysis_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +5 -5
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +11 -11
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +8 -8
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +10 -10
- package/SVF-doxygen/html/html/SVFModule_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/SVFVariables_8h_source.html +6 -6
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SymbolTableBuilder_8cpp_source.html +39 -39
- package/SVF-doxygen/html/html/SymbolTableBuilder_8h_source.html +16 -16
- package/SVF-doxygen/html/html/SymbolTableInfo_8cpp_source.html +86 -86
- package/SVF-doxygen/html/html/SymbolTableInfo_8h_source.html +118 -119
- package/SVF-doxygen/html/html/ThreadCallGraph_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8h_source.html +1 -1
- package/SVF-doxygen/html/html/VersionedFlowSensitiveStat_8cpp_source.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1AndersenSFR.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1CHGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ContextDDA.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1DDAVFSolver.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowDDA.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitive.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1GepObjVar.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1IRGraph.html +17 -17
- package/SVF-doxygen/html/html/classSVF_1_1LocationSet.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +7 -7
- package/SVF-doxygen/html/html/classSVF_1_1MemObj.html +87 -87
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo-members.html +13 -10
- package/SVF-doxygen/html/html/classSVF_1_1ObjTypeInfo.html +189 -91
- package/SVF-doxygen/html/html/classSVF_1_1ObjVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1PTAStat.html +17 -17
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +22 -22
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +23 -23
- package/SVF-doxygen/html/html/classSVF_1_1SVFModule.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SVFVar.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1StInfo-members.html +10 -13
- package/SVF-doxygen/html/html/classSVF_1_1StInfo.html +40 -137
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableBuilder.html +92 -93
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo-members.html +34 -35
- package/SVF-doxygen/html/html/classSVF_1_1SymbolTableInfo.html +175 -204
- package/SVF-doxygen/html/html/classSVF_1_1ThreadCallGraph.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +3 -3
- package/SVF-doxygen/html/html/functions_e.html +3 -0
- package/SVF-doxygen/html/html/functions_func_g.html +7 -7
- package/SVF-doxygen/html/html/functions_func_s.html +3 -3
- package/SVF-doxygen/html/html/functions_g.html +7 -7
- package/SVF-doxygen/html/html/functions_m.html +1 -5
- package/SVF-doxygen/html/html/functions_o.html +9 -9
- package/SVF-doxygen/html/html/functions_p.html +10 -10
- package/SVF-doxygen/html/html/functions_s.html +12 -14
- package/SVF-doxygen/html/html/functions_t.html +7 -7
- package/SVF-doxygen/html/html/functions_v.html +3 -3
- package/SVF-doxygen/html/html/functions_vars_e.html +3 -0
- package/SVF-doxygen/html/html/functions_vars_m.html +0 -4
- package/SVF-doxygen/html/html/functions_w.html +9 -5
- package/SVF-doxygen/html/html/search/all_10.js +7 -7
- package/SVF-doxygen/html/html/search/all_13.js +9 -9
- package/SVF-doxygen/html/html/search/all_14.js +6 -6
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +2 -2
- package/SVF-doxygen/html/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/html/search/all_5.js +1 -0
- package/SVF-doxygen/html/html/search/all_7.js +1 -1
- package/SVF-doxygen/html/html/search/all_d.js +2 -2
- package/SVF-doxygen/html/html/search/all_f.js +1 -1
- package/SVF-doxygen/html/html/search/functions_10.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +1 -1
- package/SVF-doxygen/html/html/search/functions_e.js +1 -1
- package/SVF-doxygen/html/html/search/variables_14.js +3 -3
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_5.js +1 -0
- package/SVF-doxygen/html/html/search/variables_d.js +1 -1
- package/include/MemoryModel/SymbolTableInfo.h +15 -14
- package/lib/MemoryModel/SVFIR.cpp +1 -1
- package/lib/MemoryModel/SymbolTableInfo.cpp +3 -4
- package/lib/SVF-FE/SymbolTableBuilder.cpp +3 -4
- package/package.json +1 -1
|
@@ -98,9 +98,6 @@ private:
|
|
|
98
98
|
/// Module
|
|
99
99
|
SVFModule* mod;
|
|
100
100
|
|
|
101
|
-
/// Max field limit
|
|
102
|
-
static u32_t maxFieldLimit;
|
|
103
|
-
|
|
104
101
|
/// Clean up memory
|
|
105
102
|
void destroy();
|
|
106
103
|
|
|
@@ -513,7 +510,6 @@ private:
|
|
|
513
510
|
/// Type vector of fields
|
|
514
511
|
std::vector<const Type*> flattenElementTypes;
|
|
515
512
|
/// Max field limit
|
|
516
|
-
static u32_t maxFieldLimit;
|
|
517
513
|
|
|
518
514
|
StInfo(); ///< place holder
|
|
519
515
|
StInfo(const StInfo& st); ///< place holder
|
|
@@ -529,16 +525,6 @@ public:
|
|
|
529
525
|
{
|
|
530
526
|
}
|
|
531
527
|
|
|
532
|
-
static inline void setMaxFieldLimit(u32_t limit)
|
|
533
|
-
{
|
|
534
|
-
maxFieldLimit = limit;
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
static inline u32_t getMaxFieldLimit()
|
|
538
|
-
{
|
|
539
|
-
return maxFieldLimit;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
528
|
/// struct A { int id; int salary; }; struct B { char name[20]; struct A a;} B b;
|
|
543
529
|
/// OriginalFieldType of b with field_idx 1 : Struct A
|
|
544
530
|
/// FlatternedFieldType of b with field_idx 1 : int
|
|
@@ -620,6 +606,8 @@ private:
|
|
|
620
606
|
/// maximum number of field object can be created
|
|
621
607
|
/// minimum number is 0 (field insensitive analysis)
|
|
622
608
|
u32_t maxOffsetLimit;
|
|
609
|
+
/// Size of the object or number of elements
|
|
610
|
+
u32_t elemNum;
|
|
623
611
|
|
|
624
612
|
void resetTypeForHeapStaticObj(const Type* type);
|
|
625
613
|
public:
|
|
@@ -650,6 +638,19 @@ public:
|
|
|
650
638
|
maxOffsetLimit = limit;
|
|
651
639
|
}
|
|
652
640
|
|
|
641
|
+
/// Set the number of elements of this object
|
|
642
|
+
inline void setNumOfElements(u32_t num)
|
|
643
|
+
{
|
|
644
|
+
elemNum = num;
|
|
645
|
+
setMaxFieldOffsetLimit(num);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/// Get the number of elements of this object
|
|
649
|
+
inline u32_t getNumOfElements()
|
|
650
|
+
{
|
|
651
|
+
return elemNum;
|
|
652
|
+
}
|
|
653
|
+
|
|
653
654
|
/// Flag for this object type
|
|
654
655
|
//@{
|
|
655
656
|
inline void setFlag(MEMTYPE mask)
|
|
@@ -455,7 +455,7 @@ NodeID SVFIR::addGepObjNode(const MemObj* obj, const LocationSet& ls)
|
|
|
455
455
|
assert(0==GepObjVarMap.count(std::make_pair(base, ls))
|
|
456
456
|
&& "this node should not be created before");
|
|
457
457
|
|
|
458
|
-
NodeID gepId = NodeIDAllocator::get()->allocateGepObjectId(base, ls.accumulateConstantFieldIdx(),
|
|
458
|
+
NodeID gepId = NodeIDAllocator::get()->allocateGepObjectId(base, ls.accumulateConstantFieldIdx(), Options::MaxFieldLimit);
|
|
459
459
|
GepObjVarMap[std::make_pair(base, ls)] = gepId;
|
|
460
460
|
GepObjVar *node = new GepObjVar(obj, gepId, ls);
|
|
461
461
|
memToFieldsMap[base].set(gepId);
|
|
@@ -41,10 +41,9 @@ using namespace SVFUtil;
|
|
|
41
41
|
|
|
42
42
|
DataLayout* SymbolTableInfo::dl = nullptr;
|
|
43
43
|
SymbolTableInfo* SymbolTableInfo::symInfo = nullptr;
|
|
44
|
-
u32_t StInfo::maxFieldLimit = 0;
|
|
45
44
|
|
|
46
45
|
|
|
47
|
-
ObjTypeInfo::ObjTypeInfo(const Type* t, u32_t max) : type(t), flags(0), maxOffsetLimit(max)
|
|
46
|
+
ObjTypeInfo::ObjTypeInfo(const Type* t, u32_t max) : type(t), flags(0), maxOffsetLimit(max), elemNum(max)
|
|
48
47
|
{
|
|
49
48
|
assert(t && "no type information for this object?");
|
|
50
49
|
}
|
|
@@ -93,7 +92,7 @@ SymbolTableInfo::TypeToFieldInfoMap::iterator SymbolTableInfo::getStructInfoIter
|
|
|
93
92
|
*/
|
|
94
93
|
ObjTypeInfo* SymbolTableInfo::createObjTypeInfo(const Type* type)
|
|
95
94
|
{
|
|
96
|
-
ObjTypeInfo* typeInfo = new ObjTypeInfo(type,
|
|
95
|
+
ObjTypeInfo* typeInfo = new ObjTypeInfo(type, Options::MaxFieldLimit);
|
|
97
96
|
if(type && type->isPointerTy()){
|
|
98
97
|
typeInfo->setFlag(ObjTypeInfo::HEAP_OBJ);
|
|
99
98
|
typeInfo->setFlag(ObjTypeInfo::HASPTR_OBJ);
|
|
@@ -624,7 +623,7 @@ bool ObjTypeInfo::isNonPtrFieldObj(const LocationSet& ls)
|
|
|
624
623
|
*/
|
|
625
624
|
void MemObj::setFieldSensitive()
|
|
626
625
|
{
|
|
627
|
-
typeInfo->setMaxFieldOffsetLimit(
|
|
626
|
+
typeInfo->setMaxFieldOffsetLimit(typeInfo->getNumOfElements());
|
|
628
627
|
}
|
|
629
628
|
|
|
630
629
|
|
|
@@ -51,8 +51,6 @@ void SymbolTableBuilder::buildMemModel(SVFModule* svfModule)
|
|
|
51
51
|
|
|
52
52
|
symInfo->setModule(svfModule);
|
|
53
53
|
|
|
54
|
-
StInfo::setMaxFieldLimit(Options::MaxFieldLimit);
|
|
55
|
-
|
|
56
54
|
// Pointer #0 always represents the null pointer.
|
|
57
55
|
assert(symInfo->totalSymNum++ == SymbolTableInfo::NullPtr && "Something changed!");
|
|
58
56
|
|
|
@@ -609,7 +607,7 @@ const Value* SymbolTableBuilder::getUniqueUseViaCastInst(const Value* val){
|
|
|
609
607
|
*/
|
|
610
608
|
void SymbolTableBuilder::initTypeInfo(ObjTypeInfo* typeinfo, const Value* val){
|
|
611
609
|
|
|
612
|
-
|
|
610
|
+
s32_t objSize = 1;
|
|
613
611
|
// Global variable
|
|
614
612
|
if (SVFUtil::isa<Function>(val))
|
|
615
613
|
{
|
|
@@ -652,6 +650,7 @@ void SymbolTableBuilder::initTypeInfo(ObjTypeInfo* typeinfo, const Value* val){
|
|
|
652
650
|
else if(SVFUtil::isConstantData(val))
|
|
653
651
|
{
|
|
654
652
|
typeinfo->setFlag(ObjTypeInfo::CONST_DATA);
|
|
653
|
+
objSize = SymbolTableInfo::SymbolInfo()->getNumOfFlattenElements(val->getType());
|
|
655
654
|
}
|
|
656
655
|
else{
|
|
657
656
|
assert("what other object do we have??");
|
|
@@ -660,7 +659,7 @@ void SymbolTableBuilder::initTypeInfo(ObjTypeInfo* typeinfo, const Value* val){
|
|
|
660
659
|
|
|
661
660
|
// Reset maxOffsetLimit if it is over the total fieldNum of this object
|
|
662
661
|
if(objSize > 0 && typeinfo->getMaxFieldOffsetLimit() > objSize)
|
|
663
|
-
typeinfo->
|
|
662
|
+
typeinfo->setNumOfElements(objSize);
|
|
664
663
|
}
|
|
665
664
|
|
|
666
665
|
/*!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.406",
|
|
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": {
|