-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sh
executable file
·30 lines (25 loc) · 1.01 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# For Mac
if [ $(command uname) == "Darwin" ]; then
if ! [ -x "$(command -v greadlink)" ]; then
brew install coreutils
fi
BIN_PATH=$(greadlink -f "$0")
ROOT_DIR=$(dirname $(dirname $(dirname $(dirname $BIN_PATH))))
# For Linux
else
BIN_PATH=$(readlink -f "$0")
ROOT_DIR=$(dirname $(dirname $(dirname $(dirname $BIN_PATH))))
fi
export ROOT_DIR=${ROOT_DIR}
export PATH=${ROOT_DIR}/clang+llvm/bin:${ROOT_DIR}/tool/SVF/Release-build/bin:$PATH
export LD_LIBRARY_PATH=${ROOT_DIR}/clang+llvm/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
echo "Installation completed. Everything's fine!"
set -eux
# CVE-2017-6346
cd $ROOT_DIR/evaluation/ConVul-CVE-Benchmarks/CVE-2017-6346
./cleanDIR.sh
clang -g -emit-llvm -c ./2017-6346.cpp -o 2017-6346.bc
$ROOT_DIR/tool/staticAnalysis/staticAnalysis.sh 2017-6346
export Con_PATH=$ROOT_DIR/evaluation/ConVul-CVE-Benchmarks/CVE-2017-6346/ConConfig.2017-6346
$ROOT_DIR/tool/staticAnalysis/DBDS-INSTRU/dbds-clang-fast++ -g -fsanitize=address ./2017-6346.cpp -o 2017-6346 -lpthread -ldl