svf-tools 1.0.652 → 1.0.653
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.653",
|
|
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": {
|
|
@@ -374,14 +374,22 @@ bool SaberCondAllocator::isTestNotNullExpr(const SVFValue* test) const
|
|
|
374
374
|
/*!
|
|
375
375
|
* Return true if:
|
|
376
376
|
* (1) cmp contains a null value
|
|
377
|
-
* (2) there is an indirect edge from cur evaluated SVFG node to cmp operand
|
|
377
|
+
* (2) there is an indirect/direct edge from cur evaluated SVFG node to cmp operand
|
|
378
378
|
*
|
|
379
379
|
* e.g.,
|
|
380
|
+
* indirect edge:
|
|
380
381
|
* cur svfg node -> 1. store i32* %0, i32** %p, align 8, !dbg !157
|
|
381
382
|
* cmp operand -> 2. %1 = load i32*, i32** %p, align 8, !dbg !159
|
|
382
383
|
* 3. %tobool = icmp ne i32* %1, null, !dbg !159
|
|
383
384
|
* 4. br i1 %tobool, label %if.end, label %if.then, !dbg !161
|
|
384
385
|
* There is an indirect edge 1->2 with value %0
|
|
386
|
+
*
|
|
387
|
+
* direct edge:
|
|
388
|
+
* cur svfg node -> 1. %3 = tail call i8* @malloc(i64 16), !dbg !22
|
|
389
|
+
* (cmp operand) 2. %4 = icmp eq i8* %3, null, !dbg !28
|
|
390
|
+
* 3. br i1 %4, label %7, label %5, !dbg !30
|
|
391
|
+
* There is an direct edge 1->2 with value %3
|
|
392
|
+
*
|
|
385
393
|
*/
|
|
386
394
|
bool SaberCondAllocator::isTestContainsNullAndTheValue(const CmpStmt *cmp) const
|
|
387
395
|
{
|
|
@@ -391,29 +399,24 @@ bool SaberCondAllocator::isTestContainsNullAndTheValue(const CmpStmt *cmp) const
|
|
|
391
399
|
if (SVFUtil::isa<SVFConstantNullPtr>(op1))
|
|
392
400
|
{
|
|
393
401
|
Set<const SVFValue* > inDirVal;
|
|
402
|
+
inDirVal.insert(getCurEvalSVFGNode()->getValue());
|
|
394
403
|
for (const auto &it: getCurEvalSVFGNode()->getOutEdges())
|
|
395
404
|
{
|
|
396
|
-
|
|
397
|
-
{
|
|
398
|
-
inDirVal.insert(it->getDstNode()->getValue());
|
|
399
|
-
}
|
|
405
|
+
inDirVal.insert(it->getDstNode()->getValue());
|
|
400
406
|
}
|
|
401
407
|
return inDirVal.find(op0) != inDirVal.end();
|
|
402
408
|
}
|
|
403
409
|
else if (SVFUtil::isa<SVFConstantNullPtr>(op0))
|
|
404
410
|
{
|
|
405
411
|
Set<const SVFValue* > inDirVal;
|
|
412
|
+
inDirVal.insert(getCurEvalSVFGNode()->getValue());
|
|
406
413
|
for (const auto &it: getCurEvalSVFGNode()->getOutEdges())
|
|
407
414
|
{
|
|
408
|
-
|
|
409
|
-
{
|
|
410
|
-
inDirVal.insert(it->getDstNode()->getValue());
|
|
411
|
-
}
|
|
415
|
+
inDirVal.insert(it->getDstNode()->getValue());
|
|
412
416
|
}
|
|
413
417
|
return inDirVal.find(op1) != inDirVal.end();
|
|
414
418
|
}
|
|
415
419
|
return false;
|
|
416
|
-
|
|
417
420
|
}
|
|
418
421
|
|
|
419
422
|
/*!
|