svf-tools 1.0.705 → 1.0.707
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 +1 -1
- package/svf/include/Util/ExtAPI.json +20 -4
- package/svf-llvm/lib/SVFIRBuilder.cpp +16 -2
- package/svfg_final.dot +2316 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svf-tools",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.707",
|
|
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": {
|
|
@@ -518,8 +518,16 @@
|
|
|
518
518
|
"asprintf": {
|
|
519
519
|
"return": "int",
|
|
520
520
|
"arguments": "(char **restrict, const char *restrict, ...)",
|
|
521
|
-
"type": "
|
|
522
|
-
"overwrite_app_function": 1
|
|
521
|
+
"type": "EFT_A0R_NEW",
|
|
522
|
+
"overwrite_app_function": 1,
|
|
523
|
+
"AddrStmt": {
|
|
524
|
+
"src": "Obj",
|
|
525
|
+
"dst": "Dummy"
|
|
526
|
+
},
|
|
527
|
+
"StoreStmt": {
|
|
528
|
+
"src": "Dummy",
|
|
529
|
+
"dst": "Arg0"
|
|
530
|
+
}
|
|
523
531
|
},
|
|
524
532
|
"atexit": {
|
|
525
533
|
"return": "int",
|
|
@@ -2192,8 +2200,16 @@
|
|
|
2192
2200
|
"vasprintf": {
|
|
2193
2201
|
"return": "int",
|
|
2194
2202
|
"arguments": "(char **, const char *, va_list)",
|
|
2195
|
-
"type": "
|
|
2196
|
-
"overwrite_app_function": 1
|
|
2203
|
+
"type": "EFT_A0R_NEW",
|
|
2204
|
+
"overwrite_app_function": 1,
|
|
2205
|
+
"AddrStmt": {
|
|
2206
|
+
"src": "Obj",
|
|
2207
|
+
"dst": "Dummy"
|
|
2208
|
+
},
|
|
2209
|
+
"StoreStmt": {
|
|
2210
|
+
"src": "Dummy",
|
|
2211
|
+
"dst": "Arg0"
|
|
2212
|
+
}
|
|
2197
2213
|
},
|
|
2198
2214
|
"vfprintf": {
|
|
2199
2215
|
"return": "int",
|
|
@@ -1224,6 +1224,7 @@ void SVFIRBuilder::parseOperations(std::vector<ExtAPI::Operation> &operations,
|
|
|
1224
1224
|
else
|
|
1225
1225
|
{
|
|
1226
1226
|
s32_t nodeIDType = ExtAPI::getExtAPI()->getNodeIDType(s);
|
|
1227
|
+
// return value >= 0 is an argument node
|
|
1227
1228
|
if (nodeIDType >= 0)
|
|
1228
1229
|
{
|
|
1229
1230
|
if( svfcall->arg_size() <= (u32_t) nodeIDType)
|
|
@@ -1239,29 +1240,41 @@ void SVFIRBuilder::parseOperations(std::vector<ExtAPI::Operation> &operations,
|
|
|
1239
1240
|
nodeIDMap[s] = pag->getValueNode(svfcall->getArgOperand(nodeIDType));
|
|
1240
1241
|
}
|
|
1241
1242
|
}
|
|
1243
|
+
// return value = -1 is an inst node
|
|
1242
1244
|
else if (nodeIDType == -1)
|
|
1243
1245
|
{
|
|
1244
1246
|
operands.push_back(pag->getValueNode(svfcall));
|
|
1245
1247
|
nodeIDMap[s] = pag->getValueNode(svfcall);
|
|
1246
1248
|
}
|
|
1249
|
+
// return value = -2 is a Dummy node
|
|
1247
1250
|
else if (nodeIDType == -2)
|
|
1248
1251
|
{
|
|
1249
1252
|
operands.push_back(pag->addDummyValNode());
|
|
1250
1253
|
nodeIDMap[s] = operands[operands.size() - 1];
|
|
1251
1254
|
}
|
|
1255
|
+
// return value = -3 is an object node
|
|
1252
1256
|
else if (nodeIDType == -3)
|
|
1253
1257
|
{
|
|
1254
1258
|
if (svfcall->getType()->isPointerTy())
|
|
1255
1259
|
{
|
|
1256
|
-
|
|
1257
|
-
|
|
1260
|
+
NodeID objId;
|
|
1261
|
+
// Indirect call
|
|
1262
|
+
if (getCallee(svfcall) == nullptr)
|
|
1263
|
+
objId = pag->addDummyObjNode(svfcall->getType());
|
|
1264
|
+
else // Direct call
|
|
1265
|
+
objId = pag->getObjectNode(svfcall);
|
|
1266
|
+
|
|
1267
|
+
operands.push_back(objId);
|
|
1268
|
+
nodeIDMap[s] = objId;
|
|
1258
1269
|
}
|
|
1259
1270
|
}
|
|
1271
|
+
// return value = -4 is a nullptr node
|
|
1260
1272
|
else if (nodeIDType == -4)
|
|
1261
1273
|
{
|
|
1262
1274
|
operands.push_back(pag->getNullPtr());
|
|
1263
1275
|
nodeIDMap[s] = operands[operands.size() - 1];
|
|
1264
1276
|
}
|
|
1277
|
+
// return value = -5 is an offset
|
|
1265
1278
|
else if (nodeIDType == -5)
|
|
1266
1279
|
{
|
|
1267
1280
|
for (char const &c : s)
|
|
@@ -1272,6 +1285,7 @@ void SVFIRBuilder::parseOperations(std::vector<ExtAPI::Operation> &operations,
|
|
|
1272
1285
|
operands.push_back(atoi(s.c_str()));
|
|
1273
1286
|
nodeIDMap[s] = atoi(s.c_str());
|
|
1274
1287
|
}
|
|
1288
|
+
// return value = -6 is an illegal operand format
|
|
1275
1289
|
else
|
|
1276
1290
|
assert(false && "The operand format of function operation is illegal!");
|
|
1277
1291
|
}
|