Skip to content

Commit 91c88a4

Browse files
author
nmbr7
committed
Updates
1 parent 7ccb9f0 commit 91c88a4

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

Build/compile

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
#!/bin/sh
2+
#A script to instrument a program using clang
23

4+
if [[ `clang-8 --version|grep version |egrep ' 8.'` >/dev/null ]];then
5+
6+
count=$#
7+
for i in $@;do
8+
count=$(($count-1))
9+
clang -g -fsanitize=address -fsanitize-coverage=no-prune,edge,trace-pc-guard $i -c -o i_out$count.o
10+
done
11+
clang trace-pc-guard-cb.cc i_out* -fsanitize=address
12+
rm i_out*.o
313

4-
prog=$1
5-
echo Instrumenting $prog
6-
count=$#
7-
for i in $@;do
8-
count=$(($count-1))
9-
clang -g -fsanitize=address -fsanitize-coverage=no-prune,edge,trace-pc-guard $i -c -o inst_out$count.o
10-
done
11-
clang trace-pc-guard-cb.cc inst_out* -fsanitize=address
14+
else
15+
echo "Require clang version higher than 6.0"
16+
exit
17+
fi

0 commit comments

Comments
 (0)