Skip to content

Add LibAFL example - #20

Draft
riesentoaster wants to merge 13 commits into
mainfrom
libafl_example
Draft

Add LibAFL example#20
riesentoaster wants to merge 13 commits into
mainfrom
libafl_example

Conversation

@riesentoaster

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread libafl/src/mutators.rs
Comment on lines +68 to +70
.ok_or_else(|| {
Error::unknown(format!("Failed to advance node at position {position}"))
})?;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm getting errors here, not quite sure yet why

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll check out in a bit

Comment thread libafl/src/mutators.rs
Comment on lines +118 to 127
let sampler = StdRng::seed_from_u64(state.rand_mut().next_u64());

let input = nonterminal_start::generate(&mut rng, &mut (), 0);
let mut input = DerivationTree::new(input);
let mut generator = FandangoGenerator::new(sampler, ());

let mut mutator = AdvanceMutator::new(rng, (), "test");
let sampler = StdRng::seed_from_u64(state.rand_mut().next_u64());
let mut mutator = AdvanceMutator::new(sampler, (), "test");

for _ in 0..10_000 {
let mut input: DerivationTree<nonterminal_start> = generator.generate(&mut state)?;
mutator.mutate(&mut state, &mut input)?;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this to reproduce (or just run the example fuzzer with a --stdout-file and look at those logs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants