Skip to content

Commit 396c820

Browse files
committed
why it worksgit add -u
1 parent 3bd1fe3 commit 396c820

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

libafl/src/events/launcher.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ use libafl_bolts::{
3838
shmem::ShMemProvider,
3939
};
4040
#[cfg(feature = "std")]
41-
use serde::de::DeserializeOwned;
42-
#[cfg(feature = "std")]
4341
use typed_builder::TypedBuilder;
4442

4543
#[cfg(all(unix, feature = "std", feature = "fork"))]
@@ -75,7 +73,7 @@ where
7573
S::Input: 'a,
7674
MT: Monitor,
7775
SP: ShMemProvider + 'static,
78-
S: DeserializeOwned + State + 'a,
76+
S: State + 'a,
7977
{
8078
/// The ShmemProvider to use
8179
shmem_provider: SP,
@@ -120,7 +118,7 @@ where
120118
CF: FnOnce(Option<S>, LlmpRestartingEventManager<S, SP>, CoreId) -> Result<(), Error>,
121119
MT: Monitor + Clone,
122120
SP: ShMemProvider + 'static,
123-
S: DeserializeOwned + State,
121+
S: State,
124122
{
125123
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
126124
f.debug_struct("Launcher")
@@ -140,7 +138,7 @@ impl<'a, CF, MT, S, SP> Launcher<'a, CF, MT, S, SP>
140138
where
141139
CF: FnOnce(Option<S>, LlmpRestartingEventManager<S, SP>, CoreId) -> Result<(), Error>,
142140
MT: Monitor + Clone,
143-
S: DeserializeOwned + State + HasExecutions,
141+
S: State + HasExecutions,
144142
SP: ShMemProvider + 'static,
145143
{
146144
/// Launch the broker and the clients and fuzz
@@ -400,7 +398,7 @@ where
400398
S::Input: 'a,
401399
MT: Monitor,
402400
SP: ShMemProvider + 'static,
403-
S: DeserializeOwned + State + 'a,
401+
S: State + 'a,
404402
{
405403
/// The ShmemProvider to use
406404
shmem_provider: SP,
@@ -453,7 +451,7 @@ where
453451
) -> Result<(), Error>,
454452
MT: Monitor + Clone,
455453
SP: ShMemProvider + 'static,
456-
S: DeserializeOwned + State,
454+
S: State,
457455
{
458456
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
459457
f.debug_struct("Launcher")
@@ -477,7 +475,7 @@ where
477475
CoreId,
478476
) -> Result<(), Error>,
479477
MT: Monitor + Clone,
480-
S: DeserializeOwned + State + HasExecutions,
478+
S: State + HasExecutions,
481479
SP: ShMemProvider + 'static,
482480
{
483481
/// Launch the broker and the clients and fuzz

libafl/src/events/llmp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ pub fn setup_restarting_mgr_std<MT, S>(
10841084
) -> Result<(Option<S>, LlmpRestartingEventManager<S, StdShMemProvider>), Error>
10851085
where
10861086
MT: Monitor + Clone,
1087-
S: DeserializeOwned + State + HasExecutions,
1087+
S: State + HasExecutions,
10881088
{
10891089
RestartingMgr::builder()
10901090
.shmem_provider(StdShMemProvider::new()?)
@@ -1145,7 +1145,7 @@ where
11451145
impl<MT, S, SP> RestartingMgr<MT, S, SP>
11461146
where
11471147
SP: ShMemProvider,
1148-
S: State + HasExecutions + DeserializeOwned,
1148+
S: State + HasExecutions,
11491149
MT: Monitor + Clone,
11501150
{
11511151
/// Launch the restarting manager

libafl/src/events/tcp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ pub fn setup_restarting_mgr_tcp<MT, S>(
971971
) -> Result<(Option<S>, TcpRestartingEventManager<S, StdShMemProvider>), Error>
972972
where
973973
MT: Monitor + Clone,
974-
S: DeserializeOwned + State + HasExecutions,
974+
S: State + HasExecutions,
975975
{
976976
RestartingMgr::builder()
977977
.shmem_provider(StdShMemProvider::new()?)
@@ -1032,7 +1032,7 @@ where
10321032
impl<MT, S, SP> RestartingMgr<MT, S, SP>
10331033
where
10341034
SP: ShMemProvider,
1035-
S: State + HasExecutions + DeserializeOwned,
1035+
S: State + HasExecutions,
10361036
MT: Monitor + Clone,
10371037
{
10381038
/// Launch the restarting manager

libafl/src/feedbacks/nautilus.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,10 @@ impl<'a, S> Named for NautilusFeedback<'a, S> {
8282

8383
impl<'a, S> Feedback<S> for NautilusFeedback<'a, S>
8484
where
85-
S: HasMetadata + HasClientPerfMonitor + HasCorpus<Input = NautilusInput> + State,
85+
S: HasMetadata
86+
+ HasClientPerfMonitor
87+
+ HasCorpus<Input = NautilusInput>
88+
+ State<Input = NautilusInput>,
8689
{
8790
#[allow(clippy::wrong_self_convention)]
8891
fn is_interesting<EM, OT>(

libafl_libfuzzer/libafl_libfuzzer_runtime/src/feedbacks.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use libafl::{
77
events::EventFirer,
88
executors::ExitKind,
99
feedbacks::{Feedback, MinMapFeedback},
10-
inputs::Input,
10+
inputs::{BytesInput, Input},
1111
observers::ObserversTuple,
1212
state::{HasMetadata, State},
1313
Error,
@@ -113,7 +113,7 @@ impl LibfuzzerCrashCauseFeedback {
113113

114114
impl<S> Feedback<S> for LibfuzzerCrashCauseFeedback
115115
where
116-
S: State,
116+
S: State<Input = BytesInput>,
117117
{
118118
fn is_interesting<EM, OT>(
119119
&mut self,

0 commit comments

Comments
 (0)