-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
Remove the Fuzzer dependency from Executor #2892
Remove the Fuzzer dependency from Executor #2892
Conversation
E::Observers: ObserversTuple<I, S>, | ||
EM: EventFirer<I, S> + EventRestarter<S>, | ||
OF: Feedback<EM, I, E::Observers, S>, | ||
S: HasExecutions + HasSolutions<I> + HasCurrentTestcase<I>, | ||
I: Input + Clone, | ||
Z: HasObjective<Objective = OF> + ExecutionProcessor<EM, I, E::Observers, S>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only place where the ExecutionProcessor
constraint appears. Things seem to work without it, so I'm not sure why it's there.
i like the change. what do you think @domenukk meanwhile can you fix the ci? |
Why do we need the objectives? For crash handling? Why not also pass in Feedback? What if I want to mark timeouts interesting or some stuff like that? |
hmm yeah that's a problem.. |
@riesentoaster |
Why would the executor directly call/change feedbacks anyway? Shouldn't this be done through observers? That seems like the canonical way to pass information around. |
Actually, when thinking about this some more, I think |
And the entire thing is a bit of a mess anyway. Some opinions (although this would be a major restructuring and out of scope for this PR):
|
because of crash handlers. crash handler needs feedbacks and objectives |
Why would the address of feedbacks/objectives change? |
because it is not wrapped in |
I mean we could just let executor own feedback and objective? |
no it's a problem for the |
So I've just reimplemented Also: TIL about Pin. I assume wrapping objectives and feedbacks in Pin would get really annoying. I don't think that's feasible. Somewhat related: I thought about the fuzzer some more. I think we should implement a separate Evaluator struct at some point, which would then get passed to the stages instead of the entire fuzzer. This would also mean there would be a good interface for all the replaying-for-reliability or filtering we've just bodged into fuzzer. It would also mean fuzzer doesn't need to pass itself to other functions, which is always ugly. InProcessExecutor needs access to the objectives and managers to perform logic that is very similar to the evaluator (evaluate objectives, create testcase, append metadata, put in state). So shouldn't that be handled in the evaluator somewhere? This would mean we'd need some tighter coupling between the evaluator and executor, and I'm not quite sure how this would work, but in the evaluator we have all the necessary references and it's where the code is otherwise. |
How can you resolve the problem that we need to pass the pointers?
Yes, fuzzer struct needs some changes. fuzzer struct pasing itself to others are also causing me another problem. i'm thinking about #2894
(btw it's the crash handler that needs it not the executor itself that needs the pointers to all the objects) |
I haven't. I'm passing the objective and manager as a mut borrow to the constructor, and storing the pointer in
All the more reasons.
I imagined that the evaluator would own (or at least have a reference to) the executor, not the other way around. So it'd essentially be a wrapper around the executor that deals with objectives. |
The changes: riesentoaster#1 |
to merge this, feedbacks has to be added to the argument |
I'm not sure it's worth going through all the different executors again if we're talking about restructuring them again pretty soon. Do you know of any executor that actually use the feedback? |
no there's nobody that is currently using that. but it totally makes sense to have feedback in run_target. else we cannot put testcases that timeout into the corpus |
Let's close this PR then and wait for the larger restructuring of Executor and Fuzzer. |
No description provided.