Merge bitcoin/bitcoin#27154: doc: mention sanitizer suppressions in developer docs

84ca5b349e doc: mention sanitizer suppressions in developer docs (fanquake)

Pull request description:

  Should be enough to close #17834.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 84ca5b349e

Tree-SHA512: 233c688a3cef1006c9a00f7b7a52fd6ee0ec150367e5e56904b6f1bbdca21b9217c69f8fcf653a4943613d12c3178a39f761b25eb24fc1954a563cfb1f832f5e
This commit is contained in:
glozow 2023-02-24 13:57:54 +00:00
commit be2e748f37
No known key found for this signature in database
GPG key ID: BA03F4DBE0C63FB4

View file

@ -560,8 +560,19 @@ address sanitizer, libtsan for the thread sanitizer, and libubsan for the
undefined sanitizer. If you are missing required libraries, the configure script undefined sanitizer. If you are missing required libraries, the configure script
will fail with a linker error when testing the sanitizer flags. will fail with a linker error when testing the sanitizer flags.
The test suite should pass cleanly with the `thread` and `undefined` sanitizers, The test suite should pass cleanly with the `thread` and `undefined` sanitizers. You
but there are a number of known problems when using the `address` sanitizer. The may need to use a suppressions file, see `test/sanitizer_suppressions`. They may be
used as follows:
```bash
export LSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/lsan"
export TSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/tsan:halt_on_error=1:second_deadlock_stack=1"
export UBSAN_OPTIONS="suppressions=$(pwd)/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
```
See the CI config for more examples, and upstream documentation for more information
about any additional options.
There are a number of known problems when using the `address` sanitizer. The
address sanitizer is known to fail in address sanitizer is known to fail in
[sha256_sse4::Transform](/src/crypto/sha256_sse4.cpp) which makes it unusable [sha256_sse4::Transform](/src/crypto/sha256_sse4.cpp) which makes it unusable
unless you also use `--disable-asm` when running configure. We would like to fix unless you also use `--disable-asm` when running configure. We would like to fix