about summary refs log tree commit diff
path: root/docs/notes_for_asan.md
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2021-04-04 15:28:42 +0200
committerGitHub <noreply@github.com>2021-04-04 15:28:42 +0200
commitc23183f1dc39ce0792a879065e6aea33a4c571f8 (patch)
tree68acaf32c888de02334d15814743c1463c564c15 /docs/notes_for_asan.md
parent53facd8882173873a7b78860b0fb49884de90c5b (diff)
parent99819cf5d1cbc262810f26098a5796c9d1262bc5 (diff)
downloadafl++-c23183f1dc39ce0792a879065e6aea33a4c571f8.tar.gz
Merge pull request #855 from MegaManSec/leak-sanitizer
 Add support for standalone leak-sanitizer
Diffstat (limited to 'docs/notes_for_asan.md')
-rw-r--r--docs/notes_for_asan.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/notes_for_asan.md b/docs/notes_for_asan.md
index 2b3bc028..f55aeaf2 100644
--- a/docs/notes_for_asan.md
+++ b/docs/notes_for_asan.md
@@ -28,6 +28,13 @@ Note that ASAN is incompatible with -static, so be mindful of that.
 
 (You can also use AFL_USE_MSAN=1 to enable MSAN instead.)
 
+When compiling with AFL_USE_LSAN, the leak sanitizer will normally run
+when the program exits. In order to utilize this check at different times,
+such as at the end of a loop, you may use the macro __AFL_LEAK_CHECK();.
+This macro will report a crash in afl-fuzz if any memory is left leaking
+at this stage. You can also use LSAN_OPTIONS and a supressions file
+for more fine-tuned checking, however make sure you keep exitcode=23.
+
 NOTE: if you run several secondary instances, only one should run the target
 compiled with ASAN (and UBSAN, CFISAN), the others should run the target with
 no sanitizers compiled in.