chore(ssa_fuzzer): refactor ssa fuzzer part 3/4#9679
Merged
defkit merged 12 commits intosn/refactor_ssa_fuzzer2from Sep 4, 2025
Merged
chore(ssa_fuzzer): refactor ssa fuzzer part 3/4#9679defkit merged 12 commits intosn/refactor_ssa_fuzzer2from
defkit merged 12 commits intosn/refactor_ssa_fuzzer2from
Conversation
Contributor
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Test Suite Duration'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 42e8a8c | Previous: 387b9b2 | Ratio |
|---|---|---|---|
test_report_noir-lang_noir-bignum_ |
209 s |
135 s |
1.55 |
test_report_zkpassport_noir-ecdsa_ |
3 s |
2 s |
1.50 |
test_report_zkpassport_noir_rsa_ |
2 s |
1 s |
2 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
Contributor
Author
|
I accidentally pushed to this branch instead of creating a new one
|
Rumata888
reviewed
Sep 4, 2025
| use libfuzzer_sys::arbitrary::Unstructured; | ||
| use rand::{Rng, rngs::StdRng}; | ||
|
|
||
| fn generate_random_element_function(rng: &mut StdRng) -> WitnessValue { |
Collaborator
There was a problem hiding this comment.
Why is it called this? You are not generating a function.
| //! This file contains mechanisms for deterministically mutating a given [WitnessValue](crate::fuzz_lib::fuzz_target_lib::WitnessValue) value | ||
| //! Types of mutations applied: | ||
| //! 1. Random (randomly select a new witness value) | ||
| //! 2. Max value |
Collaborator
There was a problem hiding this comment.
You have other mutations, too
| impl RandomDeletion { | ||
| fn mutate<T>(rng: &mut StdRng, vec: &mut Vec<T>) { | ||
| if !vec.is_empty() { | ||
| // do not remove the last element |
Collaborator
There was a problem hiding this comment.
Would be nice if there was an explanation why
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Big changes to initial_witness and function arguments
Now functions can returns arrays and references, or consume arrays and references
So fuzzer can generate programs like this:
or like this
type.rs->typed_value.rsblock_context.rsget_typed_value_from_mapandappend_typed_value_to_map. Now itget_stored_variableandstore_variablefind_values_with_type(ACIR vs Brillig: array set to the array of smaller size than index #9678). Regression intests/arrays.rsfunction_context.rsfuzz_target_lib.rsinitial_witness.rstests/witness.rs. Ensures that every function has at least one boolean defined.witness.rs->initial_witnessmodProblem*
Resolves
Summary*
Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.