-
-
Notifications
You must be signed in to change notification settings - Fork 319
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
Separate state trait
/impl
for generative fuzzers
#2304
base: main
Are you sure you want to change the base?
Conversation
9d43557
to
87c506d
Compare
🙃 |
87c506d
to
38fb942
Compare
Generative fuzzers do not need a corpus. To this end, this commit splits out `GenState` (trait) and `StdGenState` (struct) from `State` (trait) and `StdState` (struct). The idea is that we will support some notion of a generative fuzzer (perhaps `GenFuzzer`) that will not rely on having a "current corpus ID". Down the line, we may also want to move input loading/generation/scheduling into a method on `GenState` that returns a `State`, see AFLplusplus#2200.
38fb942
to
695f100
Compare
I think we should leave State as State and rename your current state to something else, or even just manually spell out the trait bounds where they are needed |
Just mainly because GenState looks pretty ugly 😂 |
Also I don't think we should have one StdState and one StdGenState, let's just do a StdState and a GenerativeState(?) |
Or otherwise use StdState and don't set the current corpus id? Probably something we discussed earlier already, but now if you divide the traits it should work(?) |
I'm not 100% sure I understand your suggestions, let me try to paraphrase:
So, in terms of this PR, this would be: rename
Again in terms of the code in this PR, the suggestion is: rename
So this would be: Keep both traits, but leave |
Yes to 1 and 3, for 2, I would say |
So ideally we have one State trait that doesn't have a current corpus ID, and one StdState struct that can be used for both use cases. Otherwise, have one StdState and one GenerativeState (for the same traits) |
@langston-barrett what's the status on this? Should I help out/rename the things? |
@addisoncrump we should consider this use case for our big generics cleanup |
Soo... the generics cleanup didn't go too far... Imho |
there won't be |
Given that the rework is still gonna take some time, why not merge this in the meantime? Otherwise we should close this PR IMHO |
Merging StdGenState is ok. Adding |
The GenState struct without a generative state trait makes no sense, right? |
as i said, there's no such trait as |
Why? I think we can still have a State trait that sais "If you want a state, implement the following...", right? |
because there should not be any downstream struct in libafl that uses |
Sure but it might still be useful for people to have one |
idk to me the existence of |
Generative fuzzers do not need a corpus. To this end, this commit splits out
GenState
(trait) andStdGenState
(struct) fromState
(trait) andStdState
(struct). The idea is that we will support some notion of a generative fuzzer (perhapsGenFuzzer
) that will not rely on having a "current corpus ID". Down the line, we may also want to move input loading/generation/scheduling into a method onGenState
that returns aState
, see #2200.This is progress towards #2161.