diff options
Diffstat (limited to '.travis/fuzz-linux-asan')
-rw-r--r-- | .travis/fuzz-linux-asan | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/.travis/fuzz-linux-asan b/.travis/fuzz-linux-asan deleted file mode 100644 index af8a08c..0000000 --- a/.travis/fuzz-linux-asan +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | #!/bin/sh -eux | ||
2 | |||
3 | ${CC} --version | ||
4 | |||
5 | FAKEROOT=/fakeroot | ||
6 | sudo mkdir ${FAKEROOT} | ||
7 | sudo chmod 755 ${FAKEROOT} | ||
8 | |||
9 | # Build and install libcbor. | ||
10 | git clone git://github.com/pjk/libcbor | ||
11 | cd libcbor | ||
12 | patch -p0 < ../fuzz/README | ||
13 | mkdir build | ||
14 | cd build | ||
15 | cmake -DCMAKE_C_FLAGS_DEBUG="-g2 -fno-omit-frame-pointer" \ | ||
16 | -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=Debug \ | ||
17 | -DCMAKE_INSTALL_PREFIX=${FAKEROOT} -DSANITIZE=ON \ | ||
18 | -DCMAKE_INSTALL_LIBDIR=lib .. | ||
19 | make | ||
20 | sudo make install | ||
21 | cd ../.. | ||
22 | |||
23 | # Build and install OpenSSL 1.1.1b. | ||
24 | git clone git://github.com/openssl/openssl | ||
25 | cd openssl | ||
26 | git checkout OpenSSL_1_1_1b | ||
27 | ./Configure linux-x86_64-clang enable-asan --prefix=${FAKEROOT} \ | ||
28 | --openssldir=${FAKEROOT}/openssl | ||
29 | make clean | ||
30 | make | ||
31 | sudo make install_sw | ||
32 | cd .. | ||
33 | |||
34 | # Build libfido2. | ||
35 | mkdir build | ||
36 | cd build | ||
37 | export PKG_CONFIG_PATH=/fakeroot/lib/pkgconfig | ||
38 | cmake -DFUZZ=1 -DLIBFUZZER=1 -DASAN=1 -DUBSAN=1 -DCMAKE_C_COMPILER=clang \ | ||
39 | -DCRYPTO_INCLUDE_DIRS=${FAKEROOT}/include \ | ||
40 | -DCRYPTO_LIBRARY_DIRS=${FAKEROOT}/lib \ | ||
41 | -DCBOR_INCLUDE_DIRS=${FAKEROOT}/include \ | ||
42 | -DCBOR_LIBRARY_DIRS=${FAKEROOT}/lib \ | ||
43 | -DCMAKE_BUILD_TYPE=Debug .. | ||
44 | make | ||
45 | |||
46 | # Fuzz with ASAN. | ||
47 | mkdir corpus | ||
48 | curl -s https://ambientworks.net/tmp/corpus.tgz > ../fuzz/corpus.tgz | ||
49 | tar -C corpus -zxf ../fuzz/corpus.tgz | ||
50 | fuzz/fuzz_cred -use_value_profile=1 -reload=30 -print_pcs=1 \ | ||
51 | -print_funcs=30 -timeout=10 -runs=1 corpus/fuzz_cred | ||
52 | fuzz/fuzz_assert -use_value_profile=1 -reload=30 -print_pcs=1 \ | ||
53 | -print_funcs=30 -timeout=10 -runs=1 corpus/fuzz_assert | ||
54 | fuzz/fuzz_credman -use_value_profile=1 -reload=30 -print_pcs=1 \ | ||
55 | -print_funcs=30 -timeout=10 -runs=1 corpus/fuzz_credman | ||
56 | fuzz/fuzz_mgmt -use_value_profile=1 -reload=30 -print_pcs=1 \ | ||
57 | -print_funcs=30 -timeout=10 -runs=1 corpus/fuzz_mgmt | ||
58 | fuzz/fuzz_bio -use_value_profile=1 -reload=30 -print_pcs=1 \ | ||
59 | -print_funcs=30 -timeout=10 -runs=1 corpus/fuzz_bio | ||