Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2111)

Unified Diff: testing/libfuzzer/getting_started.md

Issue 2290223003: libfuzzer: add documentation recommending how to silence error logging (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/getting_started.md
diff --git a/testing/libfuzzer/getting_started.md b/testing/libfuzzer/getting_started.md
index cfe1ab25aa46f2a811c1c5f31da03e170d12dbd2..7f7c2335e5ff5ab6a242964f77c0975638de1ca2 100644
--- a/testing/libfuzzer/getting_started.md
+++ b/testing/libfuzzer/getting_started.md
@@ -104,6 +104,23 @@ You can specify custom `max_len` value to be used by ClusterFuzz. For more
information check out [Maximum Testcase Length] section of the [Efficient Fuzzer
Guide].
+## Remove error message logging
inferno 2016/08/30 15:57:39 s/Remove/Disable noisy
robert.bradford 2016/08/30 16:16:51 Done.
+
+If the code that you are a fuzzing generates error messages when encountering
+incorrect or invalid data then you need to silence those errors in the fuzzer.
+The best way to do that is to override the environment used for logging in your
mmoroz 2016/08/30 15:54:00 I think it's worth to clarify "If the target uses
robert.bradford 2016/08/30 16:16:51 Done.
+fuzzer:
+
+```cpp
+struct Environment {
+ Environment() {
+ logging::SetMinLogLevel(logging::LOG_FATAL);
+ }
+};
+
+Environment* env = new Environment();
+```
+
## Submitting Fuzzer to ClusterFuzz
ClusterFuzz builds and executes all `fuzzer_test` targets in the source tree.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698