Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit f5a12c6

Browse files
authored
fuzz: Fix fuzz build (#2980)
1 parent 631cce0 commit f5a12c6

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

ci/fuzz.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
22

33
set -e
4+
cd "$(dirname "$0")/.."
5+
6+
source ./ci/rust-version.sh nightly
47

58
usage() {
69
exitcode=0
@@ -22,7 +25,10 @@ if [[ -z $2 ]]; then
2225
usage "No runtime provided"
2326
fi
2427

25-
HFUZZ_RUN_ARGS="--run_time $run_time --exit_upon_crash" cargo hfuzz run $fuzz_target
28+
# Temporary workaround using RUSTFLAGS and rust nightly due to:
29+
# https://github.com/rust-fuzz/honggfuzz-rs/issues/61
30+
# Once the issue is resolved, remove the RUSTFLAGS and nightly usage everywhere.
31+
RUSTFLAGS="-Znew-llvm-pass-manager=no" HFUZZ_RUN_ARGS="--run_time $run_time --exit_upon_crash" cargo +nightly-2022-02-24 hfuzz run $fuzz_target
2632

2733
# Until https://github.com/rust-fuzz/honggfuzz-rs/issues/16 is resolved,
2834
# hfuzz does not return an error code on crash, so look for a crash artifact

ci/rust-version.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ export rust_nightly_docker_image=solanalabs/rust-nightly:"$nightly_version"
4949
cd "$(dirname "${BASH_SOURCE[0]}")"
5050
case $1 in
5151
stable)
52-
rustup_install "$rust_stable"
53-
;;
54-
# nightly)
55-
# rustup_install "$rust_nightly"
56-
# ;;
52+
rustup_install "$rust_stable"
53+
;;
54+
nightly)
55+
rustup_install "$rust_nightly"
56+
;;
5757
all)
58-
rustup_install "$rust_stable"
59-
rustup_install "$rust_nightly"
58+
rustup_install "$rust_stable"
59+
rustup_install "$rust_nightly"
6060
;;
6161
*)
6262
echo "$0: Note: ignoring unknown argument: $1" >&2

0 commit comments

Comments
 (0)