Closed appetrosyan closed 2 years ago
Thank you for the report. I am able to reproduce this. I look into it as soon as I can.
This was due to a problem in afl.rs that should now be fixed: https://github.com/rust-fuzz/afl.rs/pull/197
Perhaps you would like to try again?
Very much so!
Ok. So that particular error message is gone, but not it times out on the dry run.
afl-fuzz++3.14c based on afl by Michal Zalewski and a large online community
[+] afl++ is maintained by Marc "van Hauser" Heuse, Heiko "hexcoder" Eißfeldt, Andrea Fioraldi and Dominik Maier
[+] afl++ is open source, get it at https://github.com/AFLplusplus/AFLplusplus
[+] NOTE: This is v3.x which changes defaults and behaviours - see README.md
[*] Getting to work...
[+] Using exponential power schedule (FAST)
[+] Enabled testcache with 50 MB
[!] WARNING: LD_PRELOAD is set, are you sure that is what to you want to do instead of using AFL_PRELOAD?
[*] Checking core_pattern...
[*] Checking CPU scaling governor...
[+] You have 16 CPU cores and 1 runnable tasks (utilization: 6%).
[+] Try parallel jobs - see docs/parallel_fuzzing.md.
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Checking CPU core loadout...
[+] Found a free CPU core, try binding to #0.
[*] Scanning '/mnt/Archive/Git/iroha/target/corpus/integration::integration_tests::add_account::register_account'...
[+] Loaded a total of 1 seeds.
[*] Creating hard links for all input files...
[*] Validating target binary...
[*] Spinning up the fork server...
[+] All right - fork server is up.
[*] Target map size: 627184
[*] No auto-generated dictionary tokens to reuse.
[*] Attempting dry run with 'id:000000,time:0,orig:1489f923c4dca729178b3e3233458550d8dddf29'...
[!] WARNING: Test case results in a timeout (skipping)
[-] PROGRAM ABORT : All test cases time out or crash, giving up!
Location : perform_dry_run(), src/afl-fuzz-init.c:1128
Error: Command failed: "cargo" "afl" "fuzz" "-i" "/mnt/Archive/Git/iroha/target/corpus/integration::integration_tests::add_account::register_account" "-o" "/mnt/Archive/Git/iroha/target/afl/output/integration::integration_tests::add_account::register_account" "-D" "-M" "default" "-t" "10000" "--" "/mnt/Archive/Git/iroha/target/afl/debug/deps/integration-da4d11613a91490a" "--exact" "integration_tests::add_account::register_account_fuzz::entry"
Ok. This is not a cargo-test
fuzz issue. I just tested on the examples, and they work.
Thanks for checking, @appetrosyan.
I'm afraid it's recurring. The upgrade to 1.58, seems to be the culprit.
Thanks. I'll look into this.
Sorry, but are you sure this is the case? I can't seem to reproduce this.
Also, this problem was previously caused by rust 1.58.0 not using the new LLVM pass manager, as afl.rs expected it would. But AFAICT, rust 1.58.1 also does not use the new LLVM pass manager.
After upgrading to 1.58.1 (or downgrading to 1.57) the issue is indeed resolved.
Description
When running
cargo test-fuzz
, the instrumentation seems to be absent.MWE
Steps to reproduce
cargo install cargo-test-fuzz afl
cargo test
cargo test-fuzz "try_from"
.Expected
AFL TUI to show the fuzzing progress.
Actual
Workarounds
running
doesn't help. The binary really isn't instrumented.