path: root/tests/libfuzzer
diff options
authorRobert Loehning <>2019-11-01 13:21:33 +0100
committerRobert Loehning <>2019-11-14 15:45:02 +0100
commit6e42ed217c58341966f41df31f47ed05a1f61a42 (patch)
tree01d94fd54687401b211089d89d191335ac8a894e /tests/libfuzzer
parent0ec40c21c13232906bbbf26a16278fb0da263722 (diff)
configure: Add sanitizer "fuzzer-no-link"
Adds instrumentation for fuzzing to the binaries but links to the usual main function instead of a fuzzer's. The similar sanitizer "fuzzer" should then be used only for building the test itself. Requires clang 6 or higher. Change-Id: I24ee1f018b0b97f2977dc86fbdc29a164d7c4e01 Reviewed-by: Edward Welbourne <>
Diffstat (limited to 'tests/libfuzzer')
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/libfuzzer/README b/tests/libfuzzer/README
index 57140cebfb..ded04a5798 100644
--- a/tests/libfuzzer/README
+++ b/tests/libfuzzer/README
@@ -17,6 +17,8 @@ To run a test with libFuzzer:
install libFuzzer for this version of clang explicitly.
2. Make sure clang and clang++ from this version of clang are found in PATH.
3. Configure Qt with
+ -platform linux-clang -sanitize fuzzer-no-link
+ or, if you are using clang 5
-platform linux-clang -coverage trace-pc-guard
to add the needed code coverage instrumentation. Since speed of execution is crucial for fuzz
testing, it's recommendable to also use the switches