elliottt edited PR #5482 from trevor/compile-fuzz-all-targets
to main
:
Fuzz additional targets in the cranelift-icache target. The list of targets fuzzed is controlled by the targets enabled in
fuzz/Cargo.toml
.This PR also reworks how instruction disabling is done in function generator, moving the deny-list to a function to make the decision at runtime instead of compile time.
<!--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.
-->
elliottt requested afonso360 for a review on PR #5482.
elliottt requested jameysharp for a review on PR #5482.
jameysharp submitted PR review.
jameysharp created PR review comment:
How about this, for a little more detail?
/// Returns true if we believe this `OpcodeSignature` should compile correctly /// for the given target triple. We currently have a range of known issues /// with specific lowerings on specific backends, and we don't want to get /// fuzz bug reports for those. Over time our goal is to eliminate all of these /// exceptions.
jameysharp submitted PR review.
jameysharp created PR review comment:
Would you mind factoring this "print non-default flags" logic out to a separate function and calling it from the
Debug
implementation forTestCase
as well?
jameysharp created PR review comment:
This doesn't need to be a function. It probably didn't need to be before either, come to think of it...
let supports_inline_probestack = match target_arch { Architecture::X86_64 => true, Architecture::Aarch64(_) => true, _ => false, }; // Optionally test inline stackprobes on supported platforms // TODO: Test outlined stack probes. if supports_inline_probestack && bool::arbitrary(self.u)? {
jameysharp created PR review comment:
Let's add a comment here like the one in
generate_instructions
:// We filter out targets that aren't supported in the current build // configuration after randomly choosing one, instead of randomly choosing // a supported one, so that the same fuzz input works across different build // configurations. let target = u.choose(isa::ALL_ARCHITECTURES)?;
jameysharp created PR review comment:
The comment I'm about to make is an absurd nit-pick, but I have this thing about mixing different ways of emitting newlines, and I don't think the blank line is necessary anyway. Would you mind removing the
\n
here?writeln!(f, "test compile")?;
jameysharp created PR review comment:
Unimportant and pre-existing nit: I believe the
'static
lifetime isn't required here, so I'd leave it out.const OPCODE_SIGNATURES: &[OpcodeSignature] = &[
jameysharp created PR review comment:
I think this doesn't need to be
pub
; it looks like it's only called from this module now.
jameysharp created PR review comment:
I think this doesn't need to be
pub
; it looks like it's only called from this module now.
jameysharp created PR review comment:
Let's add a comment here like the one in
generate_instructions
:// We filter out condition codes that aren't supported by the target at // this point after randomly choosing one, instead of randomly choosing a // supported one, to avoid invalidating the corpus when these get implemented. if matches!(fgen.target_triple.architecture, Architecture::Aarch64(_))
elliottt updated PR #5482 from trevor/compile-fuzz-all-targets
to main
.
elliottt updated PR #5482 from trevor/compile-fuzz-all-targets
to main
.
elliottt requested jameysharp for a review on PR #5482.
afonso360 submitted PR review.
jameysharp submitted PR review.
elliottt has enabled auto merge for PR #5482.
elliottt merged PR #5482.
Last updated: Dec 23 2024 at 12:05 UTC