svf-lib 1.0.1204 → 1.0.1207
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/DDA/DDAPass.h +0 -3
- package/SVF-linux/include/SVF-FE/BasicTypes.h +1 -0
- package/SVF-linux/include/SVF-FE/CHGBuilder.h +1 -0
- package/SVF-linux/include/SVF-FE/DCHG.h +1 -1
- package/SVF-linux/include/SVF-FE/LLVMModule.h +17 -0
- package/SVF-linux/include/Util/BasicTypes.h +0 -1
- package/SVF-linux/include/Util/ExtAPI.h +2 -2
- package/SVF-linux/include/Util/ExtAPI.json +3 -3
- package/SVF-linux/include/Util/SVFUtil.h +1 -13
- package/SVF-linux/include/WPA/WPAPass.h +0 -3
- package/SVF-osx/Release-build/lib/libSvf.a +0 -0
- package/SVF-osx/include/DDA/DDAPass.h +0 -3
- package/SVF-osx/include/SVF-FE/BasicTypes.h +1 -0
- package/SVF-osx/include/SVF-FE/CHGBuilder.h +1 -0
- package/SVF-osx/include/SVF-FE/DCHG.h +1 -1
- package/SVF-osx/include/SVF-FE/LLVMModule.h +17 -0
- package/SVF-osx/include/Util/BasicTypes.h +0 -1
- package/SVF-osx/include/Util/SVFUtil.h +1 -13
- package/SVF-osx/include/WPA/WPAPass.h +0 -3
- package/package.json +1 -1
|
Binary file
|
|
@@ -386,7 +386,7 @@ private:
|
|
|
386
386
|
void handleDISubroutineType(const DISubroutineType *subroutineType);
|
|
387
387
|
|
|
388
388
|
/// Finds all defined virtual functions and attaches them to nodes.
|
|
389
|
-
void buildVTables(const
|
|
389
|
+
void buildVTables(const SVFModule &module);
|
|
390
390
|
|
|
391
391
|
/// Returns a set of all children of type (CHA). Also gradually builds chaMap.
|
|
392
392
|
const NodeBS &cha(const DIType *type, bool firstField);
|
|
@@ -116,6 +116,23 @@ public:
|
|
|
116
116
|
return svfModule->getSVFFunction(fun);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/// Get the corresponding Function based on its name
|
|
120
|
+
inline const SVFFunction *getSVFFunction(std::string name)
|
|
121
|
+
{
|
|
122
|
+
Function *fun = nullptr;
|
|
123
|
+
|
|
124
|
+
for (u32_t i = 0; i < llvmModuleSet->getModuleNum(); ++i)
|
|
125
|
+
{
|
|
126
|
+
Module *mod = llvmModuleSet->getModule(i);
|
|
127
|
+
fun = mod->getFunction(name);
|
|
128
|
+
if (fun)
|
|
129
|
+
{
|
|
130
|
+
return llvmModuleSet->getSVFFunction(fun);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return nullptr;
|
|
134
|
+
}
|
|
135
|
+
|
|
119
136
|
/// Fun decl --> def
|
|
120
137
|
bool hasDefinition(const Function *fun) const
|
|
121
138
|
{
|
|
@@ -74,7 +74,6 @@ typedef llvm::Instruction Instruction;
|
|
|
74
74
|
typedef llvm::CallBase CallBase;
|
|
75
75
|
typedef llvm::GlobalValue GlobalValue;
|
|
76
76
|
typedef llvm::GlobalVariable GlobalVariable;
|
|
77
|
-
typedef llvm::Module Module;
|
|
78
77
|
typedef llvm::User User;
|
|
79
78
|
typedef llvm::Loop Loop;
|
|
80
79
|
typedef llvm::LoopInfo LoopInfo;
|
|
@@ -216,7 +216,7 @@ public:
|
|
|
216
216
|
return operandStr;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
std::vector<NodeID> getOperands()
|
|
219
|
+
std::vector<NodeID> &getOperands()
|
|
220
220
|
{
|
|
221
221
|
return operands;
|
|
222
222
|
}
|
|
@@ -247,7 +247,7 @@ public:
|
|
|
247
247
|
// return value = -3 is an object node
|
|
248
248
|
// return value = -4 is an offset
|
|
249
249
|
// return value = -5 is an illegal operand format
|
|
250
|
-
|
|
250
|
+
s32_t getNodeIDType(std::string s);
|
|
251
251
|
|
|
252
252
|
// Get the corresponding name in ext_t, e.g. "EXT_ADDR" in {"addr", EXT_ADDR},
|
|
253
253
|
std::string get_opName(const std::string& s);
|
|
@@ -3868,7 +3868,7 @@
|
|
|
3868
3868
|
"stpcpy": {
|
|
3869
3869
|
"type": "EFT_L_A0__A1_A0",
|
|
3870
3870
|
"overwrite_app_function": 0,
|
|
3871
|
-
"memcpy_like": ["0", "1"
|
|
3871
|
+
"memcpy_like": ["0", "1"],
|
|
3872
3872
|
"CopyStmt": {
|
|
3873
3873
|
"src": "Arg0",
|
|
3874
3874
|
"dst": "Ret"
|
|
@@ -3877,7 +3877,7 @@
|
|
|
3877
3877
|
"strcat": {
|
|
3878
3878
|
"type": "EFT_L_A0__A1_A0",
|
|
3879
3879
|
"overwrite_app_function": 0,
|
|
3880
|
-
"memcpy_like": ["0", "1"
|
|
3880
|
+
"memcpy_like": ["0", "1"],
|
|
3881
3881
|
"CopyStmt": {
|
|
3882
3882
|
"src": "Arg0",
|
|
3883
3883
|
"dst": "Ret"
|
|
@@ -3886,7 +3886,7 @@
|
|
|
3886
3886
|
"strcpy": {
|
|
3887
3887
|
"type": "EFT_L_A0__A1_A0",
|
|
3888
3888
|
"overwrite_app_function": 0,
|
|
3889
|
-
"memcpy_like": ["0", "1"
|
|
3889
|
+
"memcpy_like": ["0", "1"],
|
|
3890
3890
|
"CopyStmt": {
|
|
3891
3891
|
"src": "Arg0",
|
|
3892
3892
|
"dst": "Ret"
|
|
@@ -224,19 +224,7 @@ inline CallSite getLLVMCallSite(const Instruction* inst)
|
|
|
224
224
|
/// Get the corresponding Function based on its name
|
|
225
225
|
inline const SVFFunction* getFunction(std::string name)
|
|
226
226
|
{
|
|
227
|
-
|
|
228
|
-
LLVMModuleSet* llvmModuleset = LLVMModuleSet::getLLVMModuleSet();
|
|
229
|
-
|
|
230
|
-
for (u32_t i = 0; i < llvmModuleset->getModuleNum(); ++i)
|
|
231
|
-
{
|
|
232
|
-
Module *mod = llvmModuleset->getModule(i);
|
|
233
|
-
fun = mod->getFunction(name);
|
|
234
|
-
if(fun)
|
|
235
|
-
{
|
|
236
|
-
return llvmModuleset->getSVFFunction(fun);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return nullptr;
|
|
227
|
+
return LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(name);
|
|
240
228
|
}
|
|
241
229
|
|
|
242
230
|
/// Split into two substrings around the first occurrence of a separator string.
|
|
@@ -99,9 +99,6 @@ public:
|
|
|
99
99
|
/// Run pointer analysis on SVFModule
|
|
100
100
|
virtual void runOnModule(SVFModule* svfModule);
|
|
101
101
|
|
|
102
|
-
/// Run pointer analysis on LLVM module
|
|
103
|
-
virtual bool runOnModule(Module& module);
|
|
104
|
-
|
|
105
102
|
/// PTA name
|
|
106
103
|
virtual inline std::string getPassName() const
|
|
107
104
|
{
|
|
Binary file
|
|
@@ -386,7 +386,7 @@ private:
|
|
|
386
386
|
void handleDISubroutineType(const DISubroutineType *subroutineType);
|
|
387
387
|
|
|
388
388
|
/// Finds all defined virtual functions and attaches them to nodes.
|
|
389
|
-
void buildVTables(const
|
|
389
|
+
void buildVTables(const SVFModule &module);
|
|
390
390
|
|
|
391
391
|
/// Returns a set of all children of type (CHA). Also gradually builds chaMap.
|
|
392
392
|
const NodeBS &cha(const DIType *type, bool firstField);
|
|
@@ -116,6 +116,23 @@ public:
|
|
|
116
116
|
return svfModule->getSVFFunction(fun);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/// Get the corresponding Function based on its name
|
|
120
|
+
inline const SVFFunction *getSVFFunction(std::string name)
|
|
121
|
+
{
|
|
122
|
+
Function *fun = nullptr;
|
|
123
|
+
|
|
124
|
+
for (u32_t i = 0; i < llvmModuleSet->getModuleNum(); ++i)
|
|
125
|
+
{
|
|
126
|
+
Module *mod = llvmModuleSet->getModule(i);
|
|
127
|
+
fun = mod->getFunction(name);
|
|
128
|
+
if (fun)
|
|
129
|
+
{
|
|
130
|
+
return llvmModuleSet->getSVFFunction(fun);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return nullptr;
|
|
134
|
+
}
|
|
135
|
+
|
|
119
136
|
/// Fun decl --> def
|
|
120
137
|
bool hasDefinition(const Function *fun) const
|
|
121
138
|
{
|
|
@@ -74,7 +74,6 @@ typedef llvm::Instruction Instruction;
|
|
|
74
74
|
typedef llvm::CallBase CallBase;
|
|
75
75
|
typedef llvm::GlobalValue GlobalValue;
|
|
76
76
|
typedef llvm::GlobalVariable GlobalVariable;
|
|
77
|
-
typedef llvm::Module Module;
|
|
78
77
|
typedef llvm::User User;
|
|
79
78
|
typedef llvm::Loop Loop;
|
|
80
79
|
typedef llvm::LoopInfo LoopInfo;
|
|
@@ -224,19 +224,7 @@ inline CallSite getLLVMCallSite(const Instruction* inst)
|
|
|
224
224
|
/// Get the corresponding Function based on its name
|
|
225
225
|
inline const SVFFunction* getFunction(std::string name)
|
|
226
226
|
{
|
|
227
|
-
|
|
228
|
-
LLVMModuleSet* llvmModuleset = LLVMModuleSet::getLLVMModuleSet();
|
|
229
|
-
|
|
230
|
-
for (u32_t i = 0; i < llvmModuleset->getModuleNum(); ++i)
|
|
231
|
-
{
|
|
232
|
-
Module *mod = llvmModuleset->getModule(i);
|
|
233
|
-
fun = mod->getFunction(name);
|
|
234
|
-
if(fun)
|
|
235
|
-
{
|
|
236
|
-
return llvmModuleset->getSVFFunction(fun);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
return nullptr;
|
|
227
|
+
return LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(name);
|
|
240
228
|
}
|
|
241
229
|
|
|
242
230
|
/// Split into two substrings around the first occurrence of a separator string.
|
|
@@ -99,9 +99,6 @@ public:
|
|
|
99
99
|
/// Run pointer analysis on SVFModule
|
|
100
100
|
virtual void runOnModule(SVFModule* svfModule);
|
|
101
101
|
|
|
102
|
-
/// Run pointer analysis on LLVM module
|
|
103
|
-
virtual bool runOnModule(Module& module);
|
|
104
|
-
|
|
105
102
|
/// PTA name
|
|
106
103
|
virtual inline std::string getPassName() const
|
|
107
104
|
{
|