@@ -26,9 +26,10 @@ project, please read this guide before reporting fuzzer-generated bugs!
26
26
27
27
* Please don't:*
28
28
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).
32
33
33
34
### Discussion
34
35
@@ -107,16 +108,17 @@ these tools, post both the complete and minimized test cases. Generally,
107
108
108
109
## Effective fuzzing
109
110
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.
112
113
113
114
A variety of compiler flags can uncover different issues. ` -Zmir-opt-level=4 `
114
115
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.
116
117
117
118
If you're fuzzing a compiler you built, you may want to build it with `-C
118
119
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.
120
122
121
123
## Existing projects
122
124
0 commit comments