1#!/bin/bash
2
3set -ex
4
5export ASAN_OPTIONS="detect_odr_violation=0 detect_leaks=0"
6
7# Run address sanitizer
8RUSTFLAGS="-Z sanitizer=address" \
9cargo test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut
10
11# Run thread sanitizer
12RUSTFLAGS="-Z sanitizer=thread" \
13cargo -Zbuild-std test --target x86_64-unknown-linux-gnu --test test_bytes --test test_buf --test test_buf_mut
14