Skip to content

Commit f49ec95

Browse files
langston-barrettcompiler-errors
authored andcommitted
Address review comments
1 parent d09a940 commit f49ec95

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/fuzzing.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ project, please read this guide before reporting fuzzer-generated bugs!
2626

2727
*Please don't:*
2828

29-
- Report lots of bugs that use internal features, including but not limited to
30-
`custom_mir`, `lang_items`, `no_core`, and `rustc_attrs`.
31-
- Seed your fuzzer with inputs that are known to crash rustc (details below).
29+
- Don't report lots of bugs that use internal features, including but not
30+
limited to `custom_mir`, `lang_items`, `no_core`, and `rustc_attrs`.
31+
- Don't seed your fuzzer with inputs that are known to crash rustc (details
32+
below).
3233

3334
### Discussion
3435

@@ -107,16 +108,17 @@ these tools, post both the complete and minimized test cases. Generally,
107108

108109
## Effective fuzzing
109110

110-
When fuzzing rustc, you may want to avoid generating code, since this is mostly
111-
done by LLVM. Try `--emit=mir` instead.
111+
When fuzzing rustc, you may want to avoid generating machine code, since this
112+
is mostly done by LLVM. Try `--emit=mir` instead.
112113

113114
A variety of compiler flags can uncover different issues. `-Zmir-opt-level=4`
114115
will turn on MIR optimization passes that are not run by default, potentially
115-
uncovering interesting bugs.
116+
uncovering interesting bugs. `-Zvalidate-mir` can help uncover such bugs.
116117

117118
If you're fuzzing a compiler you built, you may want to build it with `-C
118119
target-cpu=native` or even PGO/BOLT to squeeze out a few more executions per
119-
second.
120+
second. Of course, it's best to try multiple build configurations and see
121+
what actually results in superior throughput.
120122

121123
## Existing projects
122124

0 commit comments

Comments
 (0)