From 2848aadbffacd3a99a3fc37650dee072f456640d Mon Sep 17 00:00:00 2001 From: Langston Barrett Date: Thu, 16 Mar 2023 17:36:38 -0400 Subject: [PATCH] Mention debug assertions --- src/fuzzing.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/fuzzing.md b/src/fuzzing.md index 1c6dcfe3..f687fbc9 100644 --- a/src/fuzzing.md +++ b/src/fuzzing.md @@ -120,6 +120,16 @@ target-cpu=native` or even PGO/BOLT to squeeze out a few more executions per second. Of course, it's best to try multiple build configurations and see what actually results in superior throughput. +You may want to build rustc from source with debug assertions to find +additional bugs, though this is a trade-off: it can slow down fuzzing by +requiring extra work for every execution. To enable debug assertions, add this +to `config.toml` when compiling rustc: + +```toml +[rust] +debug-assertions = true +``` + ## Existing projects - [fuzz-rustc][fuzz-rustc] demonstrates how to fuzz rustc with libfuzzer