alexcrichton opened PR #3800 from fuzz-codegen-settings
to main
:
This commit updates the
Config
fuzz-generator to consume some of the
input as configuration settings for codegen flags we pass to cranelift.
This should allow for ideally some more coverage where settings are
disabled or enabled, ideally finding possible bugs in feature-specific
implementations or generic implementations that are rarely used if the
feature-specific ones almost always take precedent.The technique used in this commit is to weight selection of codegen
settings less frequently than using the native settings. Afterwards each
listed feature is individually enabled or disabled depending on the
input fuzz data, and if a feature is enabled but the host doesn't
actually support it then the fuzz input is rejected with a log message.
The goal here is to still have many fuzz inputs accepted but also ensure
determinism across hosts. If there's a bug specifically related to
enabling a flag then running it on a host without the flag should
indicate that the flag isn't supported rather than silently leaving it
disabled and reporting the fuzz case a success.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
alexcrichton requested fitzgen for a review on PR #3800.
fitzgen submitted PR review.
fitzgen submitted PR review.
fitzgen created PR review comment:
By the way, I added a method upstream the other day that can make this a little nicer: https://docs.rs/arbitrary/latest/arbitrary/struct.Unstructured.html#method.ratio
(fwiw, I also added this method too: https://docs.rs/arbitrary/latest/arbitrary/struct.Unstructured.html#method.arbitrary_loop)
alexcrichton updated PR #3800 from fuzz-codegen-settings
to main
.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Nice!
alexcrichton updated PR #3800 from fuzz-codegen-settings
to main
.
alexcrichton updated PR #3800 from fuzz-codegen-settings
to main
.
alexcrichton merged PR #3800.
Last updated: Dec 23 2024 at 12:05 UTC