Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add utilities for handling panics and reading from stdin. #46

Merged
merged 1 commit into from
Sep 19, 2016

Conversation

frewsxcv
Copy link
Member

@frewsxcv frewsxcv commented Apr 3, 2016

@@ -25,3 +27,17 @@ extern "C" {
pub unsafe fn init() {
__afl_manual_init();
}

pub fn fuzz_run_str<F>(some_closure: F)
where F: Fn(&str)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't &[u8] make more sense here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, my current thinking is to have fuzz_run_str and fuzz_run_bytes, but I have spent very little time thinking about it. I agree that if it were just one function, it should work on bytes.

@alex
Copy link
Member

alex commented Apr 3, 2016

You forgot to add cargo-fuzz.rs

use std::process;


fn main() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO cargo fuzz should also build the example file, like cargo run --example

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO cargo fuzz should also build the example file, like cargo run --example

For example, if I was in a directory of a crate, and typed cargo fuzz, it'd build the crate and run afl-fuzz with the built binary as a parameter?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like that, yeah!

On Sat, Apr 16, 2016 at 4:08 PM, Corey Farwell notifications@github.com
wrote:

In src/cargo-fuzz.rs
#46 (comment):

@@ -0,0 +1,15 @@
+use std::env;
+use std::process;
+
+
+fn main() {

IMO cargo fuzz should also build the example file, like cargo run --example

For example, if I was in a directory of a crate, and typed cargo fuzz,
it'd build the crate and run afl-fuzz with the built binary as a
parameter?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/frewsxcv/afl.rs/pull/46/files/11b380a8204a5d6e3ee513b41f0420e7dae2dc02#r59973194

"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: D1B3 ADC0 E023 8CA6

@frewsxcv frewsxcv force-pushed the new-api branch 2 times, most recently from c0b2a25 to 7b4b2ad Compare May 28, 2016 17:24
@frewsxcv frewsxcv changed the title Testing a new API. Add utilities for handling panics and reading from stdin. Sep 19, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants