aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2021-09-21 23:07:48 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2021-09-21 23:07:48 +0200
commit7fdaf4fc63eb8f6aa70d440c50bcf23782d2cf46 (patch)
treeef997f7bf0f8cae6e9ffe527923607c2ee3944e7 /test
parent9d56918df604aeabe5d42a6fa63b1c85b4e7d840 (diff)
downloadcompcert-kvx-7fdaf4fc63eb8f6aa70d440c50bcf23782d2cf46.tar.gz
compcert-kvx-7fdaf4fc63eb8f6aa70d440c50bcf23782d2cf46.zip
grep for ASAN errors
Diffstat (limited to 'test')
-rwxr-xr-xtest/monniaux/csmith/reduce/reduce_wrt_host.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/monniaux/csmith/reduce/reduce_wrt_host.sh b/test/monniaux/csmith/reduce/reduce_wrt_host.sh
index f29436f4..ac8433da 100755
--- a/test/monniaux/csmith/reduce/reduce_wrt_host.sh
+++ b/test/monniaux/csmith/reduce/reduce_wrt_host.sh
@@ -4,6 +4,10 @@ if /usr/bin/clang $INCLUDE -O -Werror=int-conversion -Werror=format -Werror=stri
then
if gcc $INCLUDE -Werror=int-conversion -Werror=format -Werror=strict-prototypes -Werror=uninitialized -Werror=implicit -Werror=return-type -fsanitize=undefined -fsanitize=address source.c -o source.gcc+san.host && ./source.gcc+san.host > source.gcc+san.host.out ;
then
+ if grep "runtime error" source.gcc+san.out
+ then
+ exit 66
+ fi
if cmp source.clang.host.out source.gcc+san.host.out && riscv64-linux-gnu-gcc $INCLUDE -Werror=format -Werror=uninitialized -Werror=implicit source.c -Werror=return-type -o source.gcc.target && qemu-riscv64 -L /usr/riscv64-linux-gnu source.gcc.target >& source.gcc.target.out && grep checksum source.gcc.target.out > source.gcc.target.check && diff source.clang.host.out source.gcc.target.out
then
if $COMPCERT/ccomp $INCLUDE -Werror=missing-declarations -fall -fno-cse -fno-cse2 -fno-cse3 source.c -o source.ccomp.target
@@ -11,12 +15,12 @@ then
qemu-riscv64 -L /usr/riscv64-linux-gnu source.ccomp.target >& source.ccomp.target.out
if grep checksum source.ccomp.target.out > source.ccomp.target.check
then
- if diff source.ccomp.target.check source.gcc.target.check
- then exit 40
- else exit 0
- fi
+ if diff source.ccomp.target.check source.gcc.target.check
+ then exit 40
+ else exit 0
+ fi
else
- exit 50
+ exit 50
fi
else
exit 2