-
-
Notifications
You must be signed in to change notification settings - Fork 322
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
Timeout forkserver #136
Timeout forkserver #136
Conversation
I have to fix some clippy errors.. |
I don't like it either when clippy complains "XXX is being shadowed" 😓 |
libafl/src/executors/forkserver.rs
Outdated
|
||
pub fn read_st_timed(&mut self, timeout: &mut TimeVal) -> Result<Option<(usize, i32)>, Error> { | ||
let mut buf: [u8; 4] = [0u8; 4]; | ||
let st_read = self.st_pipe.read_end().unwrap(); |
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.
Maybe use ?
instead of unwrap
here?
libafl/src/executors/forkserver.rs
Outdated
&mut copy, | ||
)?; | ||
if sret > 0 { | ||
let rlen = self.st_pipe.read(&mut buf)?; |
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.
read_exact
?
Looks good, awesome stuff! :) |
Should we maybe change the forkserver example to use the TimeoutForkserver now? |
ok |
* barebones for TimeoutForkserverExecutor * TimeoutForkserverExecutor * update pid in forkserverexecutor * clppy and other small fixes * doc * fix * no unwrap * read_exact and error handling * fix * semicolon
#82 #111
I've made the TimeoutForkserverExecutor that wraps around the normal ForkserverExecutor and can check timeout also. It can be used similarly as the TimeoutExecutor, (just pass the Executor and the Duration to call the constructor).