Skip to content
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

More configurability #3

Closed
Manishearth opened this issue Feb 21, 2017 · 7 comments
Closed

More configurability #3

Manishearth opened this issue Feb 21, 2017 · 7 comments

Comments

@Manishearth
Copy link
Member

Add the ability to choose between debug/release. Pass down any other useful rustc flags.

@ruuda
Copy link
Contributor

ruuda commented Feb 23, 2017

Being able to pass arguments to libfuzzer, such as -max_size= or the location of the corpus, would also be useful. Currently I run cargo fuzz --fuzz-target fuzzer_script_1 to trigger the build, kill it, and then I start fuzz/target/debug/fuzzer_script_1 with the desired flags.

Simply passing on any extra arguments to the target program would be sufficient.

@Manishearth
Copy link
Member Author

Yep. cargo fuzz --fuzz-target foo -- FUZZ ARGS BLAH BLAH is what we'd probably use.

@nagisa
Copy link
Member

nagisa commented Mar 4, 2017

You can pass args to the underlying binary now

(try cargo fuzz run target -- -help=1)

It is still desirable to have more configuration for how the fuzz target is compiled (release/debug, debug-assertions on or off, etc)

@Bobo1239
Copy link

Bobo1239 commented Mar 4, 2017

Just asking for confirmation: Ignoring a function/crate (like https://clang.llvm.org/docs/SanitizerSpecialCaseList.html) would need rustc support, right?
(In my case rayon is triggering ASan though I believe that is rust-lang/rust#39882.)

@nagisa
Copy link
Member

nagisa commented Mar 4, 2017

No, not really. It likely can be expressed through -C llvm-args in RUSTFLAGS.

@Bobo1239
Copy link

Bobo1239 commented Mar 4, 2017

I did try RUSTFLAGS="-C llvm-args=-fsanitize-blacklist=blacklist.txt" cargo fuzz run fuzzer_script_1 but that only results in

error: failed to run `rustc` to learn about target-specific information
Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -C llvm-args=-fsanitize-blacklist=blacklist.txt -Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=3 -Zsanitizer=address -Cpanic=abort --crate-type bin --crate-type dylib --crate-type proc-macro --crate-type rlib --target x86_64-unknown-linux-gnu` (exit code: 1)
--- stderr
rustc: Unknown command line argument '-fsanitize-blacklist=blacklist.txt'.  Try: 'rustc -help'
rustc: Did you mean '-dfsan-abilist=blacklist.txt'?

Research led me to this commit hence my assumption.

edit: Just realized you may have meant expressing the the same thing but not actually using the same command line argument. In that case ignore the first part.

@Manishearth
Copy link
Member Author

Fixed in #75 and #77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants