Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ListInput #2972

Merged
merged 29 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
db321e9
Introduce ListInput
riesentoaster Feb 12, 2025
238ea8b
Add remove mutators for ListInput
riesentoaster Feb 12, 2025
93ab054
Merge branch 'main' into list-input
riesentoaster Feb 12, 2025
f890f6a
Merge branch 'main' into list-input
riesentoaster Feb 13, 2025
2f9393a
Merge ListInput and MultipartInput
riesentoaster Feb 13, 2025
dbe9c04
Merge branch 'main' into list-input
riesentoaster Feb 13, 2025
db5bf9c
Merge branch 'main' into list-input
riesentoaster Feb 13, 2025
d9ce17f
Reimplement MultipartInput as a special case of ListInput
riesentoaster Feb 14, 2025
1cf988c
Revert changes to Cargo.toml
riesentoaster Feb 14, 2025
8016d9c
Merge branch 'main' into list-input
riesentoaster Feb 14, 2025
2688cb8
Add collection of generic listinput mutators
riesentoaster Feb 14, 2025
50e6a84
Fix example
riesentoaster Feb 14, 2025
e62eafb
Add note to MIGRATION
riesentoaster Feb 14, 2025
c7ca480
Merge branch 'main' into list-input
riesentoaster Feb 15, 2025
3ca4f6c
Merge branch 'main' into list-input
riesentoaster Feb 16, 2025
4aaed70
Merge branch 'main' into list-input
riesentoaster Feb 17, 2025
ae6f640
Merge branch 'main' into list-input
riesentoaster Feb 17, 2025
2fe26f0
Merge branch 'main' into list-input
riesentoaster Feb 17, 2025
8f9aac3
Merge branch 'main' into list-input
riesentoaster Feb 18, 2025
098c272
Split list and multi into separate modules
riesentoaster Feb 18, 2025
3f543e1
Fix docs
riesentoaster Feb 18, 2025
e7f327e
Using string names again in the multi example fuzzer
riesentoaster Feb 19, 2025
fbfa3d2
Merge branch 'main' into list-input
riesentoaster Feb 19, 2025
1ed4ae1
Merge branch 'main' into list-input
riesentoaster Feb 19, 2025
be2c7d4
Remove unnecessary code
riesentoaster Feb 19, 2025
c65b15f
Fix fuzzer
riesentoaster Feb 19, 2025
8d3f39f
Use key instead of name for MultipartInput key
riesentoaster Feb 20, 2025
73cc892
Prettier code in example fuzzer
riesentoaster Feb 20, 2025
33bb0f2
Do not convert slice to vec manually
riesentoaster Feb 20, 2025
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
18 changes: 9 additions & 9 deletions fuzzers/structure_aware/baby_fuzzer_multi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ fn count_set(count: usize) {
#[expect(clippy::manual_assert)]
pub fn main() {
// The closure that we want to fuzz
let mut harness = |input: &MultipartInput<BytesInput>| {
let mut count = input.parts().len();
for (i, input) in input.parts().iter().enumerate() {
let target = input.target_bytes();
let mut harness = |input: &MultipartInput<BytesInput, ()>| {
let mut count = input.len();
for (i, input) in input.iter().enumerate() {
let target = input.1.target_bytes();
let buf = target.as_slice();
signals_set(i * 8);
if !buf.is_empty() && buf[0] == b'a' {
Expand Down Expand Up @@ -143,11 +143,11 @@ pub fn main() {
.expect("Failed to create the Executor");

// a generator here is not generalisable
let initial = MultipartInput::from([
("part", BytesInput::new(vec![b'h', b'e', b'l', b'l', b'o'])),
("part", BytesInput::new(vec![b'h', b'e', b'l', b'l', b'o'])),
("part", BytesInput::new(vec![b'h', b'e', b'l', b'l', b'o'])),
("part", BytesInput::new(vec![b'h', b'e', b'l', b'l', b'o'])),
let initial = MultipartInput::with_default_names([
BytesInput::new(vec![b'h', b'e', b'l', b'l', b'o']),
BytesInput::new(vec![b'h', b'e', b'l', b'l', b'o']),
BytesInput::new(vec![b'h', b'e', b'l', b'l', b'o']),
BytesInput::new(vec![b'h', b'e', b'l', b'l', b'o']),
]);

fuzzer
Expand Down
Loading
Loading