From 691d7664b817f22986d0351201cb8f9c332c19d6 Mon Sep 17 00:00:00 2001 From: Raunak Date: Fri, 1 Jun 2018 18:13:18 -0400 Subject: [PATCH 1/3] support for llvm 7 --- build.sh | 2 +- lib/Util/AnalysisUtil.cpp | 2 +- lib/Util/SVFModule.cpp | 2 +- setup.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index d5e752b60..ae0333295 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ ######### # Please change the following home directories of your LLVM builds ######## -LLVMRELEASE=/home/ysui/llvm-6.0.0/llvm-6.0.0.obj +LLVMRELEASE=/home/raunak/llvm-7.0.0.obj LLVMDEBUG=/home/ysui/llvm-6.0.0/llvm-6.0.0.dbg if [[ $1 == 'debug' ]] diff --git a/lib/Util/AnalysisUtil.cpp b/lib/Util/AnalysisUtil.cpp index 3b1302fd5..84756dd6a 100644 --- a/lib/Util/AnalysisUtil.cpp +++ b/lib/Util/AnalysisUtil.cpp @@ -29,7 +29,7 @@ #include "Util/AnalysisUtil.h" -#include // for FindDbgAddrUses +#include // for FindDbgAddrUses #include // for GlobalVariable #include // for Module #include // for TerminatorInst diff --git a/lib/Util/SVFModule.cpp b/lib/Util/SVFModule.cpp index f1fee0c7f..8c8b1086f 100644 --- a/lib/Util/SVFModule.cpp +++ b/lib/Util/SVFModule.cpp @@ -270,7 +270,7 @@ void LLVMModuleSet::dumpModulesToFile(const std::string suffix) { std::error_code EC; llvm::raw_fd_ostream OS(OutputFilename.c_str(), EC, llvm::sys::fs::F_None); - WriteBitcodeToFile(mod, OS); + WriteBitcodeToFile(*mod, OS); OS.flush(); } } diff --git a/setup.sh b/setup.sh index c83d97ca1..b6e653278 100755 --- a/setup.sh +++ b/setup.sh @@ -5,7 +5,7 @@ echo "Setting up environment for PTA" # Please change LLVM_OBJ_ROOT before using it ######## -export LLVM_OBJ_ROOT=/home/ysui/llvm-6.0.0/llvm-6.0.0.obj +export LLVM_OBJ_ROOT=/home/raunak/llvm-7.0.0.obj export PATH=$LLVM_OBJ_ROOT/bin:$PATH export LLVM_DIR=$LLVM_OBJ_ROOT From 3d80bfefc4f7a487623138f90b40147e9a196f77 Mon Sep 17 00:00:00 2001 From: Raunak Date: Fri, 1 Jun 2018 18:17:49 -0400 Subject: [PATCH 2/3] changed back to original --- build.sh | 2 +- setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index ae0333295..d5e752b60 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ ######### # Please change the following home directories of your LLVM builds ######## -LLVMRELEASE=/home/raunak/llvm-7.0.0.obj +LLVMRELEASE=/home/ysui/llvm-6.0.0/llvm-6.0.0.obj LLVMDEBUG=/home/ysui/llvm-6.0.0/llvm-6.0.0.dbg if [[ $1 == 'debug' ]] diff --git a/setup.sh b/setup.sh index b6e653278..c83d97ca1 100755 --- a/setup.sh +++ b/setup.sh @@ -5,7 +5,7 @@ echo "Setting up environment for PTA" # Please change LLVM_OBJ_ROOT before using it ######## -export LLVM_OBJ_ROOT=/home/raunak/llvm-7.0.0.obj +export LLVM_OBJ_ROOT=/home/ysui/llvm-6.0.0/llvm-6.0.0.obj export PATH=$LLVM_OBJ_ROOT/bin:$PATH export LLVM_DIR=$LLVM_OBJ_ROOT From 095c23b69b3355471a58994986addb3e18c55361 Mon Sep 17 00:00:00 2001 From: Raunak Pradip Shah Date: Thu, 25 Oct 2018 14:28:21 -0400 Subject: [PATCH 3/3] Update README.md --- README.md | 46 ++++++++-------------------------------------- 1 file changed, 8 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 373a4412f..1e971853a 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,8 @@ -## News - -* SVF now supports [LLVM-6.0.0](https://github.com/svf-tools/SVF/pull/38) (Contributed by [Jack Anthony](https://github.com/jackanth)). -* 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!) -* SVF now supports analysis for C++ programs. -
- - - -
-
-
-SVF is a static tool that enables scalable and precise interprocedural dependence analysis for C and C++ programs. SVF allows value-flow construction and pointer analysis to be performed iteratively, thereby providing increasingly improved precision for both. - -SVF accepts the points-to information generated by any pointer analysis (e.g., Andersen’s analysis) and constructs an interprocedural memory SSA form so that the def-use chains of both top-level and address-taken variables are captured. SVF is implemented on top of an industry-strength compiler [LLVM](http://llvm.org) (version 6.0.0). SVF contains a third party software package [CUDD-2.5.0](http://vlsi.colorado.edu/~fabio/CUDD/) (Binary Decision Diagrams (BDDs)), which is used to encode path conditions. - -
- -| About SVF | Setup Guide | User Guide | Developer Guide | -| ------------- |:-------------:| -----:|-----:| -| ![About](https://github.com/svf-tools/SVF/blob/gh-pages/images/help.png?raw=true)| ![Setup](https://github.com/svf-tools/SVF/blob/gh-pages/images/tools.png?raw=true) | ![User](https://github.com/svf-tools/SVF/blob/gh-pages/images/users.png?raw=true) | ![Developer](https://github.com/svf-tools/SVF/blob/gh-pages/images/database.png?raw=true) -| Introducing SVF -- [what it does](https://github.com/svf-tools/SVF/wiki/About#what-is-svf) and [how we design it](https://github.com/svf-tools/SVF/wiki/SVF-Design#svf-design) | A step by step [setup guide](https://github.com/svf-tools/SVF/wiki/Setup-Guide#getting-started) to build SVF | Command-line options to [run SVF](https://github.com/svf-tools/SVF/wiki/User-Guide#quick-start), get [analysis outputs](https://github.com/svf-tools/SVF/wiki/User-Guide#analysis-outputs), and test SVF with [an example](https://github.com/svf-tools/SVF/wiki/Analyze-a-Simple-C-Program) or [PTABen](https://github.com/SVF-tools/PTABen) | Detailed [technical documentation](https://github.com/svf-tools/SVF/wiki/Technical-documentation) and how to [write your own analyses](https://github.com/svf-tools/SVF/wiki/Write-your-own-analysis-in-SVF) on top of SVF | - - -
-
-

We release SVF source code in the hope of benefiting others. You are kindly asked to acknowledge usage of the tool by citing some of our publications listed http://svf-tools.github.io/SVF, especially the following two:

- -Yulei Sui and Jingling Xue. [SVF: Interprocedural Static Value-Flow Analysis in LLVM](https://yuleisui.github.io/publications/cc16.pdf) Compiler Construction (CC '16) - -Yulei Sui, Ding Ye, and Jingling Xue. [Detecting Memory Leaks Statically with Full-Sparse Value-Flow Analysis](https://yuleisui.github.io/publications/tse14.pdf) , IEEE Transactions on Software Engineering (TSE'14) - -
- - - - - +# Pointer Analysis and Program Dependence Analysis for C and C++ Programs, Forked from http://svf-tools.github.io/SVF/ + +Made compatible with llvm-7. +Updates to the following files: + - lib/Util/Analysis.cpp + - lib/Util/SVFModule.cpp + - build.sh + - setup.sh