-
-
Notifications
You must be signed in to change notification settings - Fork 330
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
Share objectives between nodes #2754
Open
BAGUVIX456
wants to merge
20
commits into
AFLplusplus:main
Choose a base branch
from
BAGUVIX456:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
033f94a
add support to share new objectives in CentralizedEventManager
BAGUVIX456 96ee382
handle received Objectives
BAGUVIX456 a88aea5
remove duplicate event fires in centralized event manager
BAGUVIX456 d369d3d
share input on share_objectives feature (broken)
BAGUVIX456 971d4ee
split impl LlmpEventManager based on share_objectives
BAGUVIX456 91e49a6
reduce code duplication in impl LlmpEventManager (broken)
BAGUVIX456 e17d84e
fix traits error (temp)
BAGUVIX456 4de182a
fix mismatched types
BAGUVIX456 2e30191
resolve merge conflicts
BAGUVIX456 10ba9e4
fix cargo format issue
BAGUVIX456 176d8e9
Merge branch 'main' into main
BAGUVIX456 f12fa78
fix merge conflicts
BAGUVIX456 eb4b884
merge duplicated functions into single impl in llmp/mod.rs
BAGUVIX456 11480dd
merge duplicate impl blocks in stages/sync.rs
BAGUVIX456 1016513
fix clippy warnings
BAGUVIX456 6c8c1ae
Merge branch 'main' into main
tokatoka 2df0594
deduplicate handle_in_client
BAGUVIX456 d28880d
cleanup unnecessary code
BAGUVIX456 b20e24b
handle objectives in tcp eventmanager
BAGUVIX456 250cacc
handle objectives in llmp eventmanager (broken)
BAGUVIX456 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -643,6 +643,21 @@ where | |
log::info!("Added received Testcase as item #{item}"); | ||
} | ||
} | ||
|
||
#[cfg(feature = "share_objectives")] | ||
BAGUVIX456 marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we add a runtime flag instead of compile time? Overhead should be minimal and it's easier to use IMHO |
||
Event::Objective { input, .. } => { | ||
log::debug!("Received new Objective"); | ||
let mut testcase = Testcase::from(input); | ||
testcase.set_parent_id_optional(*state.corpus().current()); | ||
|
||
if let Ok(mut tc) = state.current_testcase_mut() { | ||
tc.found_objective(); | ||
} | ||
|
||
state.solutions_mut().add(testcase)?; | ||
log::info!("Added received Objective to Corpus"); | ||
} | ||
|
||
Event::CustomBuf { tag, buf } => { | ||
for handler in &mut self.custom_buf_handlers { | ||
if handler(state, &tag, &buf)? == CustomBufEventResult::Handled { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -472,6 +472,9 @@ pub fn run_observers_and_save_state<E, EM, OF, Z>( | |
.fire( | ||
state, | ||
Event::Objective { | ||
#[cfg(feature = "share_objectives")] | ||
input: input.clone(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you need clone()? |
||
|
||
objective_size: state.solutions().count(), | ||
time: libafl_bolts::current_time(), | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
here put the same code as you did in llmp/mod.rs