Skip to content

Commit

Permalink
Merge pull request #23 from epi052/replace-mpsc-with-mpmc
Browse files Browse the repository at this point in the history
replaced async fuzzer's mpsc with mpmc
  • Loading branch information
epi052 authored Mar 27, 2023
2 parents 0959a28 + 83b588b commit b8f7702
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 88 deletions.
7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "feroxfuzz"
version = "1.0.0-rc.9"
version = "1.0.0-rc.10"
edition = "2021"
authors = ["Ben 'epi' Risher (@epi052)"]
license = "Apache-2.0"
Expand Down Expand Up @@ -47,7 +47,7 @@ tokio = { version = "1.20", optional = true, features = [
num = { version = "0.4" }
cfg-if = { version = "1.0" }
dyn-clone = { version = "1.0.9" }
libafl = { version = "0.8.2", default-features = false, features = ["std"] }
libafl = { version = "0.9.0", default-features = false, features = ["std"] }
url = { version = "2.2", features = ["serde"] }
## optional
serde = { version = "1.0", optional = true, features = ["derive", "rc"] }
Expand All @@ -63,8 +63,9 @@ regex = { version = "1.6" }
serde_regex = { version = "1.1.0" }
lazy_static = { version = "1.4" }
futures = { version = "0.3", optional = true }
base64 = { version = "0.13.0", optional = true }
base64 = { version = "0.13.1", optional = true }
hex = { version = "0.4.3", optional = true }
flume = { version = "0.10.14" }

[dev-dependencies]
http = { version = "0.2" }
Expand Down
6 changes: 5 additions & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ dependencies = ["upgrade-deps", "update"]
[tasks.check]
dependencies = ["clippy", "fmt", "test-lib", "test-doc", "doc"]

[tasks.test]
clear = true
dependencies = ["test-doc", "test-lib"]

# docs
[tasks.doc]
script = """
Expand Down Expand Up @@ -50,5 +54,5 @@ cargo test --all-features --doc "${@}"
[tasks.test-lib]
clear = true
script = """
cargo nextest run --all-features --lib "${@}"
cargo nextest run --all-features --retries 10 --lib "${@}"
"""
12 changes: 4 additions & 8 deletions src/deciders/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ where
// take the current action that was decided upon via decide_with_request, and the
// previously decided action (if any) to arrive at what should be returned as the
// current decided action
let final_action = match (action, new_action, operation) {
match (action, new_action, operation) {
(None, None, _) => None,
(None, Some(new_action), _) => Some(new_action),
(Some(old_action), None, _) => Some(old_action),
Expand All @@ -127,9 +127,7 @@ where
(Some(old_action), Some(new_action), LogicOperation::Or) => {
Some(old_action | new_action)
}
};

final_action
}
}

/// called after an [`HttpClient`] receives a [`Response`]
Expand Down Expand Up @@ -160,7 +158,7 @@ where
// take the current action that was decided upon via decide_with_observers, and the
// previously decided action (if any) to arrive at what should be returned as the
// current decided action
let final_action = match (action, new_action, operation) {
match (action, new_action, operation) {
(None, None, _) => None,
(None, Some(new_action), _) => Some(new_action),
(Some(old_action), None, _) => Some(old_action),
Expand All @@ -170,9 +168,7 @@ where
(Some(old_action), Some(new_action), LogicOperation::Or) => {
Some(old_action | new_action)
}
};

final_action
}
}
}

Expand Down
Loading

0 comments on commit b8f7702

Please sign in to comment.