Skip to content

Commit

Permalink
Merge pull request #236 from rust-bitcoin/sanitizers
Browse files Browse the repository at this point in the history
Add MemorySanitizer and AddressSanitizer to travis
  • Loading branch information
apoelstra committed Oct 4, 2020
2 parents f375f6d + 9dfb329 commit a3c7c0a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .travis.yml
Expand Up @@ -55,9 +55,19 @@ script:
- cargo run --example generate_keys --features=rand
- if [ ${TRAVIS_RUST_VERSION} == "stable" ]; then cargo doc --verbose --features="rand,serde,recovery,endomorphism"; fi
- if [ ${TRAVIS_RUST_VERSION} == "nightly" ]; then cargo test --verbose --benches --features=unstable; fi
- if [ ${TRAVIS_RUST_VERSION} == "nightly" -a "$TRAVIS_OS_NAME" = "linux" ]; then
cd no_std_test &&
cargo run --release | grep -q "Verified Successfully";
- |
if [ ${TRAVIS_RUST_VERSION} == "nightly" -a "$TRAVIS_OS_NAME" = "linux" ]; then
cargo clean
rustup component add rust-src
CC='clang -fsanitize=address -fno-omit-frame-pointer' \
RUSTFLAGS='-Zsanitizer=address -Clinker=clang -Cforce-frame-pointers=yes' \
ASAN_OPTIONS='detect_leaks=1 detect_invalid_pointer_pairs=1 detect_stack_use_after_return=1' \
cargo test --lib --verbose --features="rand-std serde recovery bitcoin_hashes" -Zbuild-std --target x86_64-unknown-linux-gnu &&
cargo clean &&
CC='clang -fsanitize=memory -fno-omit-frame-pointer' \
RUSTFLAGS='-Zsanitizer=memory -Zsanitizer-memory-track-origins -Cforce-frame-pointers=yes' \
cargo test --lib --verbose --features="rand-std serde recovery bitcoin_hashes" -Zbuild-std --target x86_64-unknown-linux-gnu &&
cd no_std_test && cargo run --release | grep -q "Verified Successfully"
fi
- if [ ${TRAVIS_RUST_VERSION} == "stable" -a "$TRAVIS_OS_NAME" = "linux" ]; then
clang --version &&
Expand Down

0 comments on commit a3c7c0a

Please sign in to comment.