diff options
author | Abhishek Arya <inferno@chromium.org> | 2020-11-30 10:42:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-30 10:42:25 -0800 |
commit | f043b86d7fbc594ca294dca6b51e18a590af1107 (patch) | |
tree | 730a8814c3c2b35f428431cdd5aa57f60c80ac04 /docs/getting-started | |
parent | cf0e9f0b44764e3d42d296368f1cd8175be24198 (diff) |
Leak detection is not expected to work with python targets, disable. (#4751)
Disable leak detection in python target execution wrapper since it
is not expected to work. Also, updated the documentation for python
-only code fuzzers to not use LD_PRELOAD.
Diffstat (limited to 'docs/getting-started')
-rw-r--r-- | docs/getting-started/new-project-guide/python_lang.md | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/getting-started/new-project-guide/python_lang.md b/docs/getting-started/new-project-guide/python_lang.md index 97fe1861..5bc01d90 100644 --- a/docs/getting-started/new-project-guide/python_lang.md +++ b/docs/getting-started/new-project-guide/python_lang.md @@ -85,9 +85,14 @@ for fuzzer in $(find $SRC -name '*_fuzzer.py'); do # preloaded, so this is also done here to ensure compatibility and simplify # test case reproduction. Since this helper script is what OSS-Fuzz will # actually execute, it is also always required. + # NOTE: If you are fuzzing python-only code and do not have native C/C++ + # extensions, then remove the LD_PRELOAD line below as preloading sanitizer + # library is not required and can lead to unexpected startup crashes. echo "#!/bin/sh # LLVMFuzzerTestOneInput for fuzzer detection. -LD_PRELOAD=\$(dirname "\$0")/libclang_rt.asan-x86_64.so \$(dirname "\$0")/$fuzzer_package \$@" > $OUT/$fuzzer_basename +LD_PRELOAD=\$(dirname "\$0")/libclang_rt.asan-x86_64.so \ +ASAN_OPTIONS=\$ASAN_OPTIONS:detect_leaks=0 \ +\$(dirname "\$0")/$fuzzer_package \$@" > $OUT/$fuzzer_basename chmod u+x $OUT/$fuzzer_basename done ``` |