cargo-fuzz
cargo-fuzz copied to clipboard
Crash while going through guide
Using stable 1.27.1 and nightly 2018-07-15
Log
➜ rust-url git:(bfa167b) ✗ cargo fuzz run fuzz_target_1 error: failed to run `rustc` to learn about target-specific informationCaused by: process didn't exit successfully:
rustc - --crate-name ___ --print=file-names --cfg fuzzing -Cpasses=sancov -Cllvm-args=-sanitizer-coverage-level=4 -Cllvm-args=-sanitizer-coverage-trace-pc-guard -Cllvm-args=-sanitizer-coverage-trace-compares -Cllvm-args=-sanitizer-coverage-trace-divs -Cllvm-args=-sanitizer-coverage-trace-geps -Cllvm-args=-sanitizer-coverage-prune-blocks=0 -Zsanitizer=address -Cpanic=abort --target x86_64-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro(exit code: 101) --- stderr error: the optionZis only accepted on the nightly compilererror: could not build fuzz script: "cargo" "build" "--manifest-path" "/home/shadlock0133/projects/rust/rust-url/fuzz/Cargo.toml" "--verbose" "--bin" "fuzz_target_1" "--target" "x86_64-unknown-linux-gnu"%
➜ rust-url git:(bfa167b) ✗ cargo +nightly fuzz run fuzz_target_1 Fresh cc v1.0.18 Fresh arbitrary v0.1.1
Fresh matches v0.1.6
Fresh rustc-serialize v0.3.24
Fresh url v0.2.34 (file:///home/shadlock0133/projects/rust/rust-url)
Fresh libfuzzer-sys v0.1.0 (https://github.com/rust-fuzz/libfuzzer-sys.git#86bcaac9)
Fresh url-fuzz v0.0.1 (file:///home/shadlock0133/projects/rust/rust-url/fuzz)
Finished dev [unoptimized + debuginfo] target(s) in 0.28s
Fresh cc v1.0.18 Fresh matches v0.1.6
Fresh arbitrary v0.1.1
Fresh rustc-serialize v0.3.24
Fresh url v0.2.34 (file:///home/shadlock0133/projects/rust/rust-url)
Fresh libfuzzer-sys v0.1.0 (https://github.com/rust-fuzz/libfuzzer-sys.git#86bcaac9)
Fresh url-fuzz v0.0.1 (file:///home/shadlock0133/projects/rust/rust-url/fuzz)
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
Runningfuzz/target/x86_64-unknown-linux-gnu/debug/fuzz_target_1 -artifact_prefix=/home/shadlock0133/projects/rust/rust-url/fuzz/artifacts/fuzz_target_1/ /home/shadlock0133/projects/rust/rust-url/fuzz/corpus/fuzz_target_1[1] 22280 illegal hardware instruction (core dumped) cargo +nightly fuzz run fuzz_target_1
since you ran cargo +nightly fuzz run fuzz_target_1, you're using nightly rust. can you run cargo +nightly -Vv to find out how recent your rust nightly is?
for nightly:
cargo 1.29.0-nightly (af9e40c26 2018-07-05)
release: 1.29.0
commit-hash: af9e40c26b4ea2ebd6f31ee86ee61d5ac1c74eb0
commit-date: 2018-07-05
for stable:
cargo 1.27.0 (1e95190e5 2018-05-27)
release: 1.27.0
commit-hash: 1e95190e5ffd6e6b701ad87dab4671246b96a9ce
commit-date: 2018-05-27
strange, it's all working for me on the same nightly, though on macOS
It works for me on Ubuntu 18.04.5 LTS on nightly but not stable.
cargo 1.48.0-nightly (8777a6b1e 2020-09-15) release: 1.48.0 commit-hash: 8777a6b1e8834899f51b7e09cc9b8d85b2417110 commit-date: 2020-09-15
cargo 1.46.0 (149022b1d 2020-07-17) release: 1.46.0 commit-hash: 149022b1d8f382e69c1616f6a46b69ebf59e2dea commit-date: 2020-07-17