svf-lib 1.0.1044 → 1.0.1047
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-linux/Release-build/lib/libSvf.a +0 -0
- package/SVF-linux/include/MTA/MHP.h +1 -1
- package/SVF-linux/include/MemoryModel/SVFStatements.h +5 -3
- package/SVF-linux/include/SVF-FE/LLVMUtil.h +7 -7
- package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
- package/SVF-osx/Release-build/lib/libSvf.a +0 -0
- package/SVF-osx/include/MemoryModel/SVFStatements.h +5 -3
- package/package.json +1 -1
|
Binary file
|
|
@@ -341,7 +341,7 @@ public:
|
|
|
341
341
|
NodeID parentTid = tct->getParentThread(tid);
|
|
342
342
|
const CxtThread& parentct = tct->getTCTNode(parentTid)->getCxtThread();
|
|
343
343
|
const Function* parentRoutine = tct->getStartRoutineOfCxtThread(parentct);
|
|
344
|
-
return &(
|
|
344
|
+
return &(LLVMUtil::getFunExitBB(parentRoutine)->back());
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
/// Get loop for join site
|
|
@@ -763,7 +763,7 @@ public:
|
|
|
763
763
|
//@}
|
|
764
764
|
|
|
765
765
|
/// constructor
|
|
766
|
-
SelectStmt(SVFVar* s, const OPVars& opnds, const SVFVar* cond) : MultiOpndStmt(s,opnds,SVFStmt::Select), condition(cond)
|
|
766
|
+
SelectStmt(SVFVar* s, const OPVars& opnds, const SVFVar* cond) : MultiOpndStmt(s,opnds,makeEdgeFlagWithAddionalOpnd(SVFStmt::Select,opnds.at(1))), condition(cond)
|
|
767
767
|
{
|
|
768
768
|
assert(opnds.size()==2 && "SelectStmt can only have two operands!");
|
|
769
769
|
}
|
|
@@ -816,8 +816,9 @@ public:
|
|
|
816
816
|
//@}
|
|
817
817
|
|
|
818
818
|
/// constructor
|
|
819
|
-
CmpStmt(SVFVar* s, const OPVars& opnds, u32_t pre) : MultiOpndStmt(s,opnds,SVFStmt::Cmp), predicate(pre)
|
|
819
|
+
CmpStmt(SVFVar* s, const OPVars& opnds, u32_t pre) : MultiOpndStmt(s,opnds,makeEdgeFlagWithAddionalOpnd(SVFStmt::Cmp,opnds.at(1))), predicate(pre)
|
|
820
820
|
{
|
|
821
|
+
assert(opnds.size()==2 && "CmpStmt can only have two operands!");
|
|
821
822
|
}
|
|
822
823
|
|
|
823
824
|
u32_t getPredicate() const
|
|
@@ -862,8 +863,9 @@ public:
|
|
|
862
863
|
//@}
|
|
863
864
|
|
|
864
865
|
/// constructor
|
|
865
|
-
BinaryOPStmt(SVFVar* s, const OPVars& opnds, u32_t oc) : MultiOpndStmt(s,opnds,SVFStmt::BinaryOp), opcode(oc)
|
|
866
|
+
BinaryOPStmt(SVFVar* s, const OPVars& opnds, u32_t oc) : MultiOpndStmt(s,opnds,makeEdgeFlagWithAddionalOpnd(SVFStmt::BinaryOp,opnds.at(1))), opcode(oc)
|
|
866
867
|
{
|
|
868
|
+
assert(opnds.size()==2 && "BinaryOPStmt can only have two operands!");
|
|
867
869
|
}
|
|
868
870
|
|
|
869
871
|
u32_t getOpcode() const
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
namespace SVF
|
|
41
41
|
{
|
|
42
42
|
|
|
43
|
-
namespace
|
|
43
|
+
namespace LLVMUtil
|
|
44
44
|
{
|
|
45
45
|
|
|
46
46
|
|
|
@@ -86,9 +86,9 @@ inline const PointerType *getRefTypeOfHeapAllocOrStatic(const CallSite cs)
|
|
|
86
86
|
{
|
|
87
87
|
const PointerType *refType = nullptr;
|
|
88
88
|
// Case 1: heap object held by *argument, we should get its element type.
|
|
89
|
-
if (isHeapAllocExtCallViaArg(cs))
|
|
89
|
+
if (SVFUtil::isHeapAllocExtCallViaArg(cs))
|
|
90
90
|
{
|
|
91
|
-
int argPos = getHeapAllocHoldingArgPosition(cs);
|
|
91
|
+
int argPos = SVFUtil::getHeapAllocHoldingArgPosition(cs);
|
|
92
92
|
const Value *arg = cs.getArgument(argPos);
|
|
93
93
|
if (const PointerType *argType = SVFUtil::dyn_cast<PointerType>(arg->getType()))
|
|
94
94
|
refType = SVFUtil::dyn_cast<PointerType>(getPtrElementType(argType));
|
|
@@ -96,7 +96,7 @@ inline const PointerType *getRefTypeOfHeapAllocOrStatic(const CallSite cs)
|
|
|
96
96
|
// Case 2: heap/static object held by return value.
|
|
97
97
|
else
|
|
98
98
|
{
|
|
99
|
-
assert((isStaticExtCall(cs) || isHeapAllocExtCallViaRet(cs))
|
|
99
|
+
assert((SVFUtil::isStaticExtCall(cs) || SVFUtil::isHeapAllocExtCallViaRet(cs))
|
|
100
100
|
&& "Must be heap alloc via ret, or static allocation site");
|
|
101
101
|
refType = SVFUtil::dyn_cast<PointerType>(cs.getType());
|
|
102
102
|
}
|
|
@@ -132,7 +132,7 @@ inline bool ArgInDeadFunction (const Value * val)
|
|
|
132
132
|
inline bool ArgInProgEntryFunction (const Value * val)
|
|
133
133
|
{
|
|
134
134
|
return SVFUtil::isa<Argument>(val)
|
|
135
|
-
&& isProgEntryFunction(SVFUtil::cast<Argument>(val)->getParent());
|
|
135
|
+
&& SVFUtil::isProgEntryFunction(SVFUtil::cast<Argument>(val)->getParent());
|
|
136
136
|
}
|
|
137
137
|
/// Return true if this is value in a dead function (function without any caller)
|
|
138
138
|
bool isPtrInDeadFunction (const Value * value);
|
|
@@ -145,7 +145,7 @@ bool isPtrInDeadFunction (const Value * value);
|
|
|
145
145
|
/// Return true if the function does not have a caller (either it is a main function or a dead function)
|
|
146
146
|
inline bool isNoCallerFunction (const Function * fun)
|
|
147
147
|
{
|
|
148
|
-
return isDeadFunction(fun) || isProgEntryFunction(fun);
|
|
148
|
+
return isDeadFunction(fun) || SVFUtil::isProgEntryFunction(fun);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
/// Return true if the argument in a function does not have a caller
|
|
@@ -315,7 +315,7 @@ u32_t getTypeSizeInBytes(const StructType *sty, u32_t field_index);
|
|
|
315
315
|
//@}
|
|
316
316
|
|
|
317
317
|
|
|
318
|
-
} // End namespace
|
|
318
|
+
} // End namespace LLVMUtil
|
|
319
319
|
|
|
320
320
|
} // End namespace SVF
|
|
321
321
|
|
|
Binary file
|
|
Binary file
|
|
@@ -763,7 +763,7 @@ public:
|
|
|
763
763
|
//@}
|
|
764
764
|
|
|
765
765
|
/// constructor
|
|
766
|
-
SelectStmt(SVFVar* s, const OPVars& opnds, const SVFVar* cond) : MultiOpndStmt(s,opnds,SVFStmt::Select), condition(cond)
|
|
766
|
+
SelectStmt(SVFVar* s, const OPVars& opnds, const SVFVar* cond) : MultiOpndStmt(s,opnds,makeEdgeFlagWithAddionalOpnd(SVFStmt::Select,opnds.at(1))), condition(cond)
|
|
767
767
|
{
|
|
768
768
|
assert(opnds.size()==2 && "SelectStmt can only have two operands!");
|
|
769
769
|
}
|
|
@@ -816,8 +816,9 @@ public:
|
|
|
816
816
|
//@}
|
|
817
817
|
|
|
818
818
|
/// constructor
|
|
819
|
-
CmpStmt(SVFVar* s, const OPVars& opnds, u32_t pre) : MultiOpndStmt(s,opnds,SVFStmt::Cmp), predicate(pre)
|
|
819
|
+
CmpStmt(SVFVar* s, const OPVars& opnds, u32_t pre) : MultiOpndStmt(s,opnds,makeEdgeFlagWithAddionalOpnd(SVFStmt::Cmp,opnds.at(1))), predicate(pre)
|
|
820
820
|
{
|
|
821
|
+
assert(opnds.size()==2 && "CmpStmt can only have two operands!");
|
|
821
822
|
}
|
|
822
823
|
|
|
823
824
|
u32_t getPredicate() const
|
|
@@ -862,8 +863,9 @@ public:
|
|
|
862
863
|
//@}
|
|
863
864
|
|
|
864
865
|
/// constructor
|
|
865
|
-
BinaryOPStmt(SVFVar* s, const OPVars& opnds, u32_t oc) : MultiOpndStmt(s,opnds,SVFStmt::BinaryOp), opcode(oc)
|
|
866
|
+
BinaryOPStmt(SVFVar* s, const OPVars& opnds, u32_t oc) : MultiOpndStmt(s,opnds,makeEdgeFlagWithAddionalOpnd(SVFStmt::BinaryOp,opnds.at(1))), opcode(oc)
|
|
866
867
|
{
|
|
868
|
+
assert(opnds.size()==2 && "BinaryOPStmt can only have two operands!");
|
|
867
869
|
}
|
|
868
870
|
|
|
869
871
|
u32_t getOpcode() const
|