Merge pull request #236 from rust-bitcoin/sanitizers
Add MemorySanitizer and AddressSanitizer to travis
This commit is contained in:
commit
a3c7c0a424
16
.travis.yml
16
.travis.yml
|
@ -55,9 +55,19 @@ script:
|
||||||
- cargo run --example generate_keys --features=rand
|
- 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} == "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" ]; then cargo test --verbose --benches --features=unstable; fi
|
||||||
- if [ ${TRAVIS_RUST_VERSION} == "nightly" -a "$TRAVIS_OS_NAME" = "linux" ]; then
|
- |
|
||||||
cd no_std_test &&
|
if [ ${TRAVIS_RUST_VERSION} == "nightly" -a "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||||
cargo run --release | grep -q "Verified Successfully";
|
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
|
fi
|
||||||
- if [ ${TRAVIS_RUST_VERSION} == "stable" -a "$TRAVIS_OS_NAME" = "linux" ]; then
|
- if [ ${TRAVIS_RUST_VERSION} == "stable" -a "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||||
clang --version &&
|
clang --version &&
|
||||||
|
|
Loading…
Reference in New Issue