diff --git a/Cargo.lock b/Cargo.lock index a86590f8..cf70fbcc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1886,13 +1886,14 @@ dependencies = [ [[package]] name = "honggfuzz" -version = "0.5.54" +version = "0.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea09577d948a98a5f59b7c891e274c4fb35ad52f67782b3d0cb53b9c05301f1" +checksum = "848e9c511092e0daa0a35a63e8e6e475a3e8f870741448b9f6028d69b142f18e" dependencies = [ "arbitrary", "lazy_static", - "memmap", + "memmap2", + "rustc_version", ] [[package]] @@ -2470,16 +2471,6 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" -[[package]] -name = "memmap" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" -dependencies = [ - "libc", - "winapi 0.3.9", -] - [[package]] name = "memmap2" version = "0.5.3" diff --git a/ci/fuzz.sh b/ci/fuzz.sh index c4cf9033..30fe823d 100755 --- a/ci/fuzz.sh +++ b/ci/fuzz.sh @@ -3,7 +3,11 @@ set -e cd "$(dirname "$0")/.." -source ./ci/rust-version.sh nightly +# honggfuzz uses a newer version of arbitrary, which requires a newer version of Rust +# Once SPL upgrades to Rust 1.63.0, look into removing version specification +RUST_STABLE_VERSION=1.63.0 source ./ci/rust-version.sh stable + +cargo +"$rust_stable" install honggfuzz --version=0.5.55 --force || true usage() { exitcode=0 @@ -25,10 +29,7 @@ if [[ -z $2 ]]; then usage "No runtime provided" fi -# Temporary workaround using RUSTFLAGS and rust nightly due to: -# https://github.com/rust-fuzz/honggfuzz-rs/issues/61 -# Once the issue is resolved, remove the RUSTFLAGS and nightly usage everywhere. -RUSTFLAGS="-Znew-llvm-pass-manager=no" HFUZZ_RUN_ARGS="--run_time $run_time --exit_upon_crash" cargo +"$rust_nightly" hfuzz run $fuzz_target +HFUZZ_RUN_ARGS="--run_time $run_time --exit_upon_crash" cargo +"$rust_stable" hfuzz run $fuzz_target # Until https://github.com/rust-fuzz/honggfuzz-rs/issues/16 is resolved, # hfuzz does not return an error code on crash, so look for a crash artifact diff --git a/ci/install-program-deps.sh b/ci/install-program-deps.sh index 14f10b5e..63415322 100755 --- a/ci/install-program-deps.sh +++ b/ci/install-program-deps.sh @@ -9,6 +9,5 @@ set -x cargo --version cargo install rustfilt || true -cargo install honggfuzz --version=0.5.54 --force || true cargo +"$rust_stable" build-sbf --version diff --git a/token-swap/program/fuzz/Cargo.toml b/token-swap/program/fuzz/Cargo.toml index e64ea795..d67579b1 100644 --- a/token-swap/program/fuzz/Cargo.toml +++ b/token-swap/program/fuzz/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" publish = false [dependencies] -honggfuzz = { version = "0.5.54" } +honggfuzz = { version = "0.5.55" } arbitrary = { version = "1.0", features = ["derive"] } solana-program = "1.11.6" spl-math = { version = "0.1", path = "../../../libraries/math", features = [ "no-entrypoint" ] }