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

Merge ASAN_OPTIONS instead of overwriting them #84

Merged
merged 1 commit into from
Mar 14, 2017

Conversation

ruuda
Copy link
Contributor

@ruuda ruuda commented Mar 12, 2017

This concatenates the detect_odr_violation=0 option to existing ASAN_OPTIONS, instead of overwriting them, which allows users to pass their own ASAN_OPTIONS.

One use case for this is limiting the fuzzing time by passing -max_total_time to libfuzzer: when the allowed time expires, the fuzzer will stop in the middle of a fuzzing target, and leak sanitizer will report an error, and exit with a nonzero exit code. Setting ASAN_OPTIONS="detect_leaks=0" works around this problem, but then cargo-fuzz must not overwrite those options. Concatenate them instead.

@ruuda ruuda changed the title Merge ASAN_OPTIONS instead of overwiting them Merge ASAN_OPTIONS instead of overwriting them Mar 12, 2017
This concatenates the "detect_odr_violation=0" option to existing
ASAN_OPTIONS, instead of overwriting them, which allows users to pass
their own ASAN_OPTIONS.

One use case for this is limiting the fuzzing time by passing
-max_total_time to libfuzzer: when the allowed time expires, the fuzzer
will stop in the middle of a fuzzing target, and leak sanitizer
will report an error, and exit with a nonzero exit code. Setting
ASAN_OPTIONS="detect_leaks=0" works around this problem, but then
cargo-fuzz must not overwrite those options. Concatenate them instead.
@ruuda
Copy link
Contributor Author

ruuda commented Mar 12, 2017

Build failure appears to be caused by rust-lang/cargo#3819.

@frewsxcv
Copy link
Member

Thanks!

bors r+

@frewsxcv
Copy link
Member

bors r+

@frewsxcv frewsxcv merged commit 0ec8f28 into rust-fuzz:master Mar 14, 2017
ruuda added a commit to ruuda/claxon that referenced this pull request Mar 14, 2017
This relies on my fix for ASAN_OPTIONS (concatenate user options,
instead of overwriting them) landing in cargo-fuzz.

See rust-fuzz/cargo-fuzz#84.
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

Successfully merging this pull request may close these issues.

2 participants