Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#30870: docs: updated developer notes for --with…
Browse files Browse the repository at this point in the history
…-sanitizers to -DSANITIZERS

4b1ce3c docs: updated developer notes for --with-sanitizers to -DSANITIZERS and removed resource for -fsanitze flags (kevkevinpal)

Pull request description:

  In the developer notes we are incorrectly using the Autotools `--with-sanitizers` configure flag which we should now be using `cmake -B build -DSANITIZERS=<values>` instead now

ACKs for top commit:
  maflcko:
    review ACK 4b1ce3c
  achow101:
    ACK 4b1ce3c
  pablomartin4btc:
    ACK 4b1ce3c

Tree-SHA512: 029d55d802f6b4a85f3541f9a23e9ac85e6c590e91081204bfa737169138f61877883db51ad99cd8b802b0737eec35df5a33a5351b3e6b2f180f3ad0282d3616
  • Loading branch information
achow101 committed Sep 11, 2024
2 parents 0725a37 + 4b1ce3c commit a8809ae
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ See the functional test documentation for how to invoke perf within tests.
Bitcoin Core can be compiled with various "sanitizers" enabled, which add
instrumentation for issues regarding things like memory safety, thread race
conditions, or undefined behavior. This is controlled with the
`--with-sanitizers` configure flag, which should be a comma separated list of
`-DSANITIZERS` cmake build flag, which should be a comma separated list of
sanitizers to enable. The sanitizer list should correspond to supported
`-fsanitize=` options in your compiler. These sanitizers have runtime overhead,
so they are most useful when testing changes or producing debugging builds.
Expand All @@ -564,10 +564,10 @@ Some examples:

```bash
# Enable both the address sanitizer and the undefined behavior sanitizer
./configure --with-sanitizers=address,undefined
cmake -B build -DSANITIZERS=address,undefined

# Enable the thread sanitizer
./configure --with-sanitizers=thread
cmake -B build -DSANITIZERS=thread
```

If you are compiling with GCC you will typically need to install corresponding
Expand All @@ -589,7 +589,7 @@ See the CI config for more examples, and upstream documentation for more informa
about any additional options.

Not all sanitizer options can be enabled at the same time, e.g. trying to build
with `--with-sanitizers=address,thread` will fail in the configure script as
with `-DSANITIZERS=address,thread` will fail in the configure script as
these sanitizers are mutually incompatible. Refer to your compiler manual to
learn more about these options and which sanitizers are supported by your
compiler.
Expand All @@ -603,7 +603,6 @@ Additional resources:
* [UndefinedBehaviorSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html)
* [GCC Instrumentation Options](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html)
* [Google Sanitizers Wiki](https://github.com/google/sanitizers/wiki)
* [Issue #12691: Enable -fsanitize flags in Travis](https://github.com/bitcoin/bitcoin/issues/12691)

Locking/mutex usage notes
-------------------------
Expand Down

0 comments on commit a8809ae

Please sign in to comment.