svf-tools 1.0.1286 → 1.0.1288
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1288",
|
|
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": {
|
|
@@ -849,10 +849,6 @@ private:
|
|
|
849
849
|
{
|
|
850
850
|
return addValNode(new IntrinsicValVar(i, type));
|
|
851
851
|
}
|
|
852
|
-
inline NodeID addBasicBlockValNode(NodeID i, const SVFType* type)
|
|
853
|
-
{
|
|
854
|
-
return addValNode(new BasicBlockValVar(i, type));
|
|
855
|
-
}
|
|
856
852
|
inline NodeID addAsmPCValNode(NodeID i, const SVFType* type)
|
|
857
853
|
{
|
|
858
854
|
return addValNode(new AsmPCValVar(i, type));
|
|
@@ -81,7 +81,6 @@ public:
|
|
|
81
81
|
// │ └─ Subclass: DummyValVar
|
|
82
82
|
DummyValNode, // │ └── Dummy node for uninitialized values
|
|
83
83
|
IntrinsicValNode, // │ └── LLVM intrinsic call instruction (e.g. llvm.dbg.declare)
|
|
84
|
-
BasicBlockValNode, // │ └── LLVM BasicBlock (label operand of br/switch)
|
|
85
84
|
AsmPCValNode, // │ └── InlineAsm, DSOLocalEquivalent, NoCFIValue
|
|
86
85
|
|
|
87
86
|
// └─ Subclass: ObjVar (Object variable nodes)
|
|
@@ -232,7 +231,7 @@ protected:
|
|
|
232
231
|
|
|
233
232
|
static inline bool isSVFVarKind(GNodeK n)
|
|
234
233
|
{
|
|
235
|
-
static_assert(DummyObjNode - ValNode ==
|
|
234
|
+
static_assert(DummyObjNode - ValNode == 28,
|
|
236
235
|
"The number of SVFVarKinds has changed, make sure the "
|
|
237
236
|
"range is correct");
|
|
238
237
|
|
|
@@ -241,7 +240,7 @@ protected:
|
|
|
241
240
|
|
|
242
241
|
static inline bool isValVarKinds(GNodeK n)
|
|
243
242
|
{
|
|
244
|
-
static_assert(AsmPCValNode - ValNode ==
|
|
243
|
+
static_assert(AsmPCValNode - ValNode == 15,
|
|
245
244
|
"The number of ValVarKinds has changed, make sure the "
|
|
246
245
|
"range is correct");
|
|
247
246
|
return n <= AsmPCValNode && n >= ValNode;
|
|
@@ -2220,46 +2220,6 @@ public:
|
|
|
2220
2220
|
virtual const std::string toString() const;
|
|
2221
2221
|
};
|
|
2222
2222
|
|
|
2223
|
-
/*
|
|
2224
|
-
* Represents an LLVM BasicBlock (label operand of br/switch).
|
|
2225
|
-
* Collected into valSyms as a branch operand but has no ICFGNode.
|
|
2226
|
-
*/
|
|
2227
|
-
class BasicBlockValVar: public ValVar
|
|
2228
|
-
{
|
|
2229
|
-
friend class GraphDBClient;
|
|
2230
|
-
|
|
2231
|
-
public:
|
|
2232
|
-
static inline bool classof(const BasicBlockValVar*)
|
|
2233
|
-
{
|
|
2234
|
-
return true;
|
|
2235
|
-
}
|
|
2236
|
-
static inline bool classof(const SVFVar* node)
|
|
2237
|
-
{
|
|
2238
|
-
return node->getNodeKind() == SVFVar::BasicBlockValNode;
|
|
2239
|
-
}
|
|
2240
|
-
static inline bool classof(const ValVar* node)
|
|
2241
|
-
{
|
|
2242
|
-
return node->getNodeKind() == SVFVar::BasicBlockValNode;
|
|
2243
|
-
}
|
|
2244
|
-
static inline bool classof(const GenericPAGNodeTy* node)
|
|
2245
|
-
{
|
|
2246
|
-
return node->getNodeKind() == SVFVar::BasicBlockValNode;
|
|
2247
|
-
}
|
|
2248
|
-
static inline bool classof(const SVFValue* node)
|
|
2249
|
-
{
|
|
2250
|
-
return node->getNodeKind() == SVFVar::BasicBlockValNode;
|
|
2251
|
-
}
|
|
2252
|
-
|
|
2253
|
-
BasicBlockValVar(NodeID i, const SVFType* svfType)
|
|
2254
|
-
: ValVar(i, svfType, nullptr, BasicBlockValNode) {}
|
|
2255
|
-
|
|
2256
|
-
inline const std::string getValueName() const
|
|
2257
|
-
{
|
|
2258
|
-
return "basicBlockVal";
|
|
2259
|
-
}
|
|
2260
|
-
virtual const std::string toString() const;
|
|
2261
|
-
};
|
|
2262
|
-
|
|
2263
2223
|
/*
|
|
2264
2224
|
* Represents InlineAsm, DSOLocalEquivalent, and NoCFIValue.
|
|
2265
2225
|
* These are non-instruction values related to inline assembly,
|
|
@@ -104,7 +104,6 @@ ValVar::ValVar(NodeID i, const SVFType* svfType, const ICFGNode* node, PNODEK ty
|
|
|
104
104
|
SVFUtil::isa<FunValVar>(this) ||
|
|
105
105
|
SVFUtil::isa<DummyValVar>(this) ||
|
|
106
106
|
SVFUtil::isa<IntrinsicValVar>(this) ||
|
|
107
|
-
SVFUtil::isa<BasicBlockValVar>(this) ||
|
|
108
107
|
SVFUtil::isa<AsmPCValVar>(this))
|
|
109
108
|
{
|
|
110
109
|
// These ValVar subclasses don't require an ICFGNode.
|
|
@@ -568,14 +567,6 @@ const std::string IntrinsicValVar::toString() const
|
|
|
568
567
|
return rawstr.str();
|
|
569
568
|
}
|
|
570
569
|
|
|
571
|
-
const std::string BasicBlockValVar::toString() const
|
|
572
|
-
{
|
|
573
|
-
std::string str;
|
|
574
|
-
std::stringstream rawstr(str);
|
|
575
|
-
rawstr << "BasicBlockValVar ID: " << getId();
|
|
576
|
-
return rawstr.str();
|
|
577
|
-
}
|
|
578
|
-
|
|
579
570
|
const std::string AsmPCValVar::toString() const
|
|
580
571
|
{
|
|
581
572
|
std::string str;
|
|
@@ -510,10 +510,6 @@ void SVFIRBuilder::initialiseValVars()
|
|
|
510
510
|
{
|
|
511
511
|
pag->addConstantAggValNode(iter->second, icfgNode, llvmModuleSet()->getSVFType(llvmValue->getType()));
|
|
512
512
|
}
|
|
513
|
-
else if (SVFUtil::isa<BasicBlock>(llvmValue))
|
|
514
|
-
{
|
|
515
|
-
pag->addBasicBlockValNode(iter->second, llvmModuleSet()->getSVFType(llvmValue->getType()));
|
|
516
|
-
}
|
|
517
513
|
else if (SVFUtil::isa<InlineAsm>(llvmValue) ||
|
|
518
514
|
SVFUtil::isa<DSOLocalEquivalent>(llvmValue) ||
|
|
519
515
|
SVFUtil::isa<NoCFIValue>(llvmValue))
|
|
@@ -298,10 +298,15 @@ void SymbolTableBuilder::collectSym(const Value* val)
|
|
|
298
298
|
void SymbolTableBuilder::collectVal(const Value* val)
|
|
299
299
|
{
|
|
300
300
|
// collect and record special sym here
|
|
301
|
-
if (
|
|
301
|
+
if (
|
|
302
|
+
LLVMUtil::isNullPtrSym(val) ||
|
|
303
|
+
LLVMUtil::isBlackholeSym(val) ||
|
|
304
|
+
SVFUtil::isa<BasicBlock>(val)
|
|
305
|
+
)
|
|
302
306
|
{
|
|
303
307
|
return;
|
|
304
308
|
}
|
|
309
|
+
|
|
305
310
|
LLVMModuleSet::ValueToIDMapTy::iterator iter = llvmModuleSet()->valSymMap.find(val);
|
|
306
311
|
if (iter == llvmModuleSet()->valSymMap.end())
|
|
307
312
|
{
|