Conversation
…dd empty afl fuzz target, use 'skip_remove_unreachable' in 'ssa_fuzzer'
| pub fn primary_passes(options: &SsaEvaluatorOptions) -> Vec<SsaPass> { | ||
| vec![ | ||
| SsaPass::new(Ssa::remove_unreachable_functions, "Removing Unreachable Functions"), | ||
| opt_remove_unreachable_functions(options.skip_remove_unreachable, "Removing Unreachable Functions"), |
There was a problem hiding this comment.
I think if we modify the SSA pipeline for testing, then we should do it in a more generic way, for example by passing additional parameters to the SsaBuilder:
- a set of
msgvalues to skip in the pipeline - a number of passes after which to stop modifying the SSA
- a number of passes to skip before starting to modify the SSA
That way we can turn anything off, for example we could say something along the lines of:
let ssa0 = gen_initial_ssa(ast);
let ssa1 = SsaBuilder::new(ssa0).limit(10).build();
let ssa2 = SsaBuilder::new(ssa1).skip(10).limit(1).build();In this example the only difference between ssa1 and ssa2 would be that ssa1 has step 11 applied on it.
I could use this as well in #8413 ; I'll try to open a PR to do it.
There was a problem hiding this comment.
On second thought: it would be unnecessary to add this SQL-like offset and limit to the SsaBuilder, since if one has access to the builder to capture the SSA at those stages, then one can just pass the list of steps already limited to what they want, and stopping the pipeline in the general use case could prevent the creation of valid Brillig or ACIR bytecode anyway.
I added the option to filter any pass by message in #8416
There was a problem hiding this comment.
I think if we modify the SSA pipeline for testing, then we should do it in a more generic way, for example by passing additional parameters to the SsaBuilder
I agree. I thought it would be useful to have a more generic method, but chose this to get the fuzzer running sooner.
My plan is to keep using the bool for this pass/fuzzer (at least until the end of the canary audit) and use your "filter any pass by message" feature for the other passes.
Description
Problem*
Summary*
ssa_fuzzerAdding a new fuzz target w/cargo-aflAdditional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.