-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
allow failed afl mapping to allow non-forkserver usage #3087
base: main
Are you sure you want to change the base?
Conversation
libafl_targets/src/forkserver.rs
Outdated
/// | ||
/// # Note | ||
/// | ||
/// The function's logic is written in C and this code is a wrapper. | ||
pub fn map_shared_memory() { | ||
pub fn map_shared_memory() -> u8 { |
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.
Can you add
let ret = unsafe {__afl_map_shm()};
if ret == 0 {
log::info!("running fuzzer in replay mode");
}
or any log you want
wait but you sure this really works? |
Or it simply points to a global array by default? in that case yeah it works. |
Oh sorry, I should set the PR as draft. I expect everything to get merged once I port-ed unicornafl to rust. |
Description
Current implementation blocks "non-forkserver" usage due to
exit(1)
immediately. This PR fixes it.Common usages include building binaries for both fuzzing and replaying crashes. My usage is rewriting unicornafl to rust.
Checklist
./scripts/precommit.sh
and addressed all comments