diff options
| author | Langston Barrett <langston.barrett@gmail.com> | 2023-03-16 16:56:35 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-16 18:40:40 -0700 |
| commit | 7dedcf9ade17e5ae6a4aa3ea737decc22002b105 (patch) | |
| tree | 965f41ad26f65ad20a9203ff7da5c5f875fe0409 /src/doc/rustc-dev-guide | |
| parent | 4b03d9f7747d80df6ec47a21356b082d87537259 (diff) | |
| download | rust-7dedcf9ade17e5ae6a4aa3ea737decc22002b105.tar.gz rust-7dedcf9ade17e5ae6a4aa3ea737decc22002b105.zip | |
Address review comments
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/fuzzing.md | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/doc/rustc-dev-guide/src/fuzzing.md b/src/doc/rustc-dev-guide/src/fuzzing.md index 56d55f2b908..1c6dcfe3a21 100644 --- a/src/doc/rustc-dev-guide/src/fuzzing.md +++ b/src/doc/rustc-dev-guide/src/fuzzing.md @@ -26,9 +26,10 @@ project, please read this guide before reporting fuzzer-generated bugs! *Please don't:* -- Report lots of bugs that use internal features, including but not limited to - `custom_mir`, `lang_items`, `no_core`, and `rustc_attrs`. -- Seed your fuzzer with inputs that are known to crash rustc (details below). +- Don't report lots of bugs that use internal features, including but not + limited to `custom_mir`, `lang_items`, `no_core`, and `rustc_attrs`. +- Don't seed your fuzzer with inputs that are known to crash rustc (details + below). ### Discussion @@ -107,16 +108,17 @@ these tools, post both the complete and minimized test cases. Generally, ## Effective fuzzing -When fuzzing rustc, you may want to avoid generating code, since this is mostly -done by LLVM. Try `--emit=mir` instead. +When fuzzing rustc, you may want to avoid generating machine code, since this +is mostly done by LLVM. Try `--emit=mir` instead. A variety of compiler flags can uncover different issues. `-Zmir-opt-level=4` will turn on MIR optimization passes that are not run by default, potentially -uncovering interesting bugs. +uncovering interesting bugs. `-Zvalidate-mir` can help uncover such bugs. If you're fuzzing a compiler you built, you may want to build it with `-C target-cpu=native` or even PGO/BOLT to squeeze out a few more executions per -second. +second. Of course, it's best to try multiple build configurations and see +what actually results in superior throughput. ## Existing projects |
