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

Add --sanitizer=none #129

Closed
mateon1 opened this issue Oct 14, 2017 · 6 comments
Closed

Add --sanitizer=none #129

mateon1 opened this issue Oct 14, 2017 · 6 comments

Comments

@mateon1
Copy link

mateon1 commented Oct 14, 2017

Currently it is impossible to make cargo-fuzz NOT use a sanitizer. This is usually worked around by using threadsan, as it doesn't do much for most programs, but I'm pretty sure that incurs some runtime cost.

I want to compile in release mode with no sanitizers to achieve maximum performance while looking for panics, as Rust eliminates most errors the sanitizers are made to detect.

@Manishearth
Copy link
Member

This isn't possible, you must use a sanitizer to get the fuzzing instrumentation to work. This could perhaps be fixed by a PR to upstream rust.

@alex
Copy link
Member

alex commented Nov 11, 2017

In C it's possible to get -fsanitize-coverage=<trace-pc-guard, etc.> without -fsanitize=<address|memory|...>

Is that not possible here?

@PaulGrandperrin
Copy link
Member

It's true that right now, building without a sanitizer (by building your own version of cargo-fuzz) produces non-working targets but that shouldn't be the case.
While debugging an issue in rustc/llvm rust-lang/rust#47953 , I came to build a toolchain with llvm6.0 and libfuzzer6.0.
And with this toolchain and a modified cargo-fuzz (without any sanitizers but more coverage trace points), the fuzzing works really well and is very fast!

@PaulGrandperrin
Copy link
Member

PaulGrandperrin added a commit to rust-fuzz/honggfuzz-rs that referenced this issue Feb 10, 2018
@kevincox
Copy link

Another use case for this is building with musl for a static library. This makes it really easy to ship a fuzzer to multiple machines. Right now none of the sanitizers are supported for musl. If I could build without sanitizers I believe I could build with musl.

@fitzgen
Copy link
Member

fitzgen commented Jan 28, 2021

This is supported now.

@fitzgen fitzgen closed this as completed Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants