@@ -40,29 +40,32 @@ pub mod inner;
4040pub mod stateful;
4141
4242/// The process executor simply calls a target function, as mutable reference to a closure.
43- pub type InProcessExecutor < ' a , H , I , OT , S > = GenericInProcessExecutor < H , & ' a mut H , ( ) , I , OT , S > ;
43+ pub type InProcessExecutor < ' a , EM , H , I , OT , S , Z > =
44+ GenericInProcessExecutor < EM , H , & ' a mut H , ( ) , I , OT , S , Z > ;
4445
4546/// The inprocess executor that allows hooks
46- pub type HookableInProcessExecutor < ' a , H , HT , I , OT , S > =
47- GenericInProcessExecutor < H , & ' a mut H , HT , I , OT , S > ;
47+ pub type HookableInProcessExecutor < ' a , EM , H , HT , I , OT , S , Z > =
48+ GenericInProcessExecutor < EM , H , & ' a mut H , HT , I , OT , S , Z > ;
4849/// The process executor simply calls a target function, as boxed `FnMut` trait object
49- pub type OwnedInProcessExecutor < I , OT , S > = GenericInProcessExecutor <
50+ pub type OwnedInProcessExecutor < EM , I , OT , S , Z > = GenericInProcessExecutor <
51+ EM ,
5052 dyn FnMut ( & I ) -> ExitKind ,
5153 Box < dyn FnMut ( & I ) -> ExitKind > ,
5254 ( ) ,
5355 I ,
5456 OT ,
5557 S ,
58+ Z ,
5659> ;
5760
5861/// The inmem executor simply calls a target function, then returns afterwards.
59- pub struct GenericInProcessExecutor < H , HB , HT , I , OT , S > {
62+ pub struct GenericInProcessExecutor < EM , H , HB , HT , I , OT , S , Z > {
6063 harness_fn : HB ,
61- inner : GenericInProcessExecutorInner < HT , I , OT , S > ,
64+ inner : GenericInProcessExecutorInner < EM , HT , I , OT , S , Z > ,
6265 phantom : PhantomData < ( * const H , HB ) > ,
6366}
6467
65- impl < H , HB , HT , I , OT , S > Debug for GenericInProcessExecutor < H , HB , HT , I , OT , S >
68+ impl < EM , H , HB , HT , I , OT , S , Z > Debug for GenericInProcessExecutor < EM , H , HB , HT , I , OT , S , Z >
6669where
6770 OT : Debug ,
6871{
7578}
7679
7780impl < EM , H , HB , HT , I , OT , S , Z > Executor < EM , I , S , Z >
78- for GenericInProcessExecutor < H , HB , HT , I , OT , S >
81+ for GenericInProcessExecutor < EM , H , HB , HT , I , OT , S , Z >
7982where
8083 S : HasExecutions ,
8184 OT : ObserversTuple < I , S > ,
@@ -106,7 +109,9 @@ where
106109 }
107110}
108111
109- impl < H , HB , HT , I , OT , S > HasObservers for GenericInProcessExecutor < H , HB , HT , I , OT , S > {
112+ impl < EM , H , HB , HT , I , OT , S , Z > HasObservers
113+ for GenericInProcessExecutor < EM , H , HB , HT , I , OT , S , Z >
114+ {
110115 type Observers = OT ;
111116
112117 #[ inline]
@@ -120,15 +125,15 @@ impl<H, HB, HT, I, OT, S> HasObservers for GenericInProcessExecutor<H, HB, HT, I
120125 }
121126}
122127
123- impl < ' a , H , I , OT , S > InProcessExecutor < ' a , H , I , OT , S >
128+ impl < ' a , EM , H , I , OT , S , Z > InProcessExecutor < ' a , EM , H , I , OT , S , Z >
124129where
125130 H : FnMut ( & I ) -> ExitKind + Sized ,
126131 OT : ObserversTuple < I , S > ,
127132 S : HasCurrentTestcase < I > + HasExecutions + HasSolutions < I > ,
128133 I : Input ,
129134{
130135 /// Create a new in mem executor with the default timeout (5 sec)
131- pub fn new < EM , OF , Z > (
136+ pub fn new < OF > (
132137 harness_fn : & ' a mut H ,
133138 observers : OT ,
134139 fuzzer : & mut Z ,
@@ -140,7 +145,7 @@ where
140145 OF : Feedback < EM , I , OT , S > ,
141146 Z : HasObjective < Objective = OF > ,
142147 {
143- Self :: with_timeout_generic :: < EM , OF , Z > (
148+ Self :: with_timeout_generic :: < OF > (
144149 tuple_list ! ( ) ,
145150 harness_fn,
146151 observers,
@@ -153,7 +158,7 @@ where
153158
154159 /// Create a new in mem executor with the default timeout and use batch mode(5 sec)
155160 #[ cfg( all( feature = "std" , target_os = "linux" ) ) ]
156- pub fn batched_timeout < EM , OF , Z > (
161+ pub fn batched_timeout < OF > (
157162 harness_fn : & ' a mut H ,
158163 observers : OT ,
159164 fuzzer : & mut Z ,
@@ -166,7 +171,7 @@ where
166171 OF : Feedback < EM , I , OT , S > ,
167172 Z : HasObjective < Objective = OF > ,
168173 {
169- let inner = GenericInProcessExecutorInner :: batched_timeout_generic :: < Self , EM , OF , Z > (
174+ let inner = GenericInProcessExecutorInner :: batched_timeout_generic :: < Self , OF > (
170175 tuple_list ! ( ) ,
171176 observers,
172177 fuzzer,
@@ -190,7 +195,7 @@ where
190195 /// * `observers` - the observers observing the target during execution
191196 ///
192197 /// This may return an error on unix, if signal handler setup fails
193- pub fn with_timeout < EM , OF , Z > (
198+ pub fn with_timeout < OF > (
194199 harness_fn : & ' a mut H ,
195200 observers : OT ,
196201 fuzzer : & mut Z ,
@@ -203,7 +208,7 @@ where
203208 OF : Feedback < EM , I , OT , S > ,
204209 Z : HasObjective < Objective = OF > ,
205210 {
206- let inner = GenericInProcessExecutorInner :: with_timeout_generic :: < Self , EM , OF , Z > (
211+ let inner = GenericInProcessExecutorInner :: with_timeout_generic :: < Self , OF > (
207212 tuple_list ! ( ) ,
208213 observers,
209214 fuzzer,
@@ -220,7 +225,7 @@ where
220225 }
221226}
222227
223- impl < H , HB , HT , I , OT , S > GenericInProcessExecutor < H , HB , HT , I , OT , S >
228+ impl < EM , H , HB , HT , I , OT , S , Z > GenericInProcessExecutor < EM , H , HB , HT , I , OT , S , Z >
224229where
225230 H : FnMut ( & I ) -> ExitKind + Sized ,
226231 HB : BorrowMut < H > ,
@@ -230,7 +235,7 @@ where
230235 I : Input ,
231236{
232237 /// Create a new in mem executor with the default timeout (5 sec)
233- pub fn generic < EM , OF , Z > (
238+ pub fn generic < OF > (
234239 user_hooks : HT ,
235240 harness_fn : HB ,
236241 observers : OT ,
@@ -243,7 +248,7 @@ where
243248 OF : Feedback < EM , I , OT , S > ,
244249 Z : HasObjective < Objective = OF > ,
245250 {
246- Self :: with_timeout_generic :: < EM , OF , Z > (
251+ Self :: with_timeout_generic :: < OF > (
247252 user_hooks,
248253 harness_fn,
249254 observers,
@@ -256,7 +261,7 @@ where
256261
257262 /// Create a new in mem executor with the default timeout and use batch mode(5 sec)
258263 #[ cfg( all( feature = "std" , target_os = "linux" ) ) ]
259- pub fn batched_timeout_generic < EM , OF , Z > (
264+ pub fn batched_timeout_generic < OF > (
260265 user_hooks : HT ,
261266 harness_fn : HB ,
262267 observers : OT ,
@@ -271,7 +276,7 @@ where
271276 OF : Feedback < EM , I , OT , S > ,
272277 Z : HasObjective < Objective = OF > ,
273278 {
274- let inner = GenericInProcessExecutorInner :: batched_timeout_generic :: < Self , EM , OF , Z > (
279+ let inner = GenericInProcessExecutorInner :: batched_timeout_generic :: < Self , OF > (
275280 user_hooks, observers, fuzzer, state, event_mgr, exec_tmout,
276281 ) ?;
277282
@@ -290,7 +295,7 @@ where
290295 /// * `observers` - the observers observing the target during execution
291296 ///
292297 /// This may return an error on unix, if signal handler setup fails
293- pub fn with_timeout_generic < EM , OF , Z > (
298+ pub fn with_timeout_generic < OF > (
294299 user_hooks : HT ,
295300 harness_fn : HB ,
296301 observers : OT ,
@@ -304,7 +309,7 @@ where
304309 OF : Feedback < EM , I , OT , S > ,
305310 Z : HasObjective < Objective = OF > ,
306311 {
307- let inner = GenericInProcessExecutorInner :: with_timeout_generic :: < Self , EM , OF , Z > (
312+ let inner = GenericInProcessExecutorInner :: with_timeout_generic :: < Self , OF > (
308313 user_hooks, observers, fuzzer, state, event_mgr, timeout,
309314 ) ?;
310315
@@ -349,8 +354,8 @@ pub trait HasInProcessHooks<I, S> {
349354 fn inprocess_hooks_mut ( & mut self ) -> & mut InProcessHooks < I , S > ;
350355}
351356
352- impl < H , HB , HT , I , OT , S > HasInProcessHooks < I , S >
353- for GenericInProcessExecutor < H , HB , HT , I , OT , S >
357+ impl < EM , H , HB , HT , I , OT , S , Z > HasInProcessHooks < I , S >
358+ for GenericInProcessExecutor < EM , H , HB , HT , I , OT , S , Z >
354359{
355360 /// the timeout handler
356361 #[ inline]
0 commit comments