run_address_sanitizer.sh 370 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env bash

mkdir cmake-build-release-address-sanitizer
cd cmake-build-release-address-sanitizer
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DTHREAD_SANITIZER=OFF -DADDRESS_SANITIZER=ON
make

# run the actual tests with sanitizer enabled, reporting the result
ASAN_OPTIONS="detect_stack_use_after_return=1 detect_leaks=1" ./bin/tests
STATUS_CODE=$?

exit $STATUS_CODE