Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/fuzzing.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ project, please read this guide before reporting fuzzer-generated bugs!
- 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).
- You do not need to report minor bugs you already traced to LLVM. It can go upstream.

### Discussion

Expand Down Expand Up @@ -80,6 +81,28 @@ To build a corpus, you may want to use:

[glacier]: https://github.com/rust-lang/glacier

## Handling rustc-external issues

Historically, Rust has received many bugs for external software like LLVM which we took on as
our responsibility.
For instance, we would patch our fork or send the bug to their tracker,
and keep a Rust-side bug open to track backports or mitigations in rustc.
Comment thread
tshepang marked this conversation as resolved.
Resolved
This was when bug reports for miscompilations were rare, mostly "organic" instead of fuzzed,
and it was not always clear we were using LLVM correctly instead of generating malformed LLVMIR.

We have been tracking LLVM more closely since 2022.
Updates to our LLVM fork are more frequent and almost always backports or new LLVM releases,
since we work more closely with LLVM.
If you trace a miscompilation to LLVM, it is most important the bug is fixed upstream,
so please try to make sure the bug reaches [llvm-project/issues] first.

Obscure or config-specific miscompilations can usually wait for the next LLVM patch release,
so we may close fuzzed bugs traced to LLVM if they do not have major impact on Rust code.
If you aren't certain if the issue is in LLVM, whether it warrants an expedited backport,
or even just how to file the bug against LLVM, then go ahead and submit the issue anyways.

[llvm-project/issues]: https://github.com/llvm/llvm-project/issues

## Extra credit

Here are a few things you can do to help the Rust project after filing an ICE:
Expand Down
Loading