Skip to content

Commit 5c3e4d8

Browse files
committed
doc: add a section about using MSan
Thanks to Niklas Pieter and Michael for the pointers.
1 parent 5691fa9 commit 5c3e4d8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

doc/fuzzing.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ INFO: seed corpus: files: 991 min: 1b max: 1858b total: 288291b rss: 150Mb
101101
102102
```
103103
104+
## Using the MemorySanitizer (MSan)
105+
106+
MSan [requires](https://clang.llvm.org/docs/MemorySanitizer.html#handling-external-code)
107+
that all linked code be instrumented. The exact steps to achieve this may vary
108+
but involve compiling `clang` from source, using the built `clang` to compile
109+
an instrumentalized libc++, then using it to build [Bitcoin Core dependencies
110+
from source](../depends/README.md) and finally the Bitcoin Core fuzz binary
111+
itself. One can use the MSan CI job as an example for how to perform these
112+
steps.
113+
114+
Valgrind is an alternative to MSan that does not require building a custom libc++.
115+
104116
## Run without sanitizers for increased throughput
105117
106118
Fuzzing on a harness compiled with `-DSANITIZERS=address,fuzzer,undefined` is

0 commit comments

Comments
 (0)