Skip to content

Commit 3670db8

Browse files
Merge branch 'develop' into ji/exec-1-filter-plan
2 parents c0b802c + e0c00d5 commit 3670db8

43 files changed

Lines changed: 1046 additions & 395 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actions/build-fuzzers/action.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ runs:
4747
components: ""
4848
enable-sccache: "false"
4949

50+
- uses: ./.github/actions/setup-fuzz-linker
51+
if: steps.cache.outputs.cache-hit != 'true'
52+
5053
- name: Install cargo-fuzz
5154
if: steps.cache.outputs.cache-hit != 'true'
5255
uses: taiki-e/cache-cargo-install-action@66c9585ef5ca780ee69399975a5e911f47905995
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: Copyright the Vortex contributors
3+
4+
name: "Setup Fuzz Linker"
5+
description: "Use mold for native Linux fuzzer builds"
6+
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Configure mold
11+
if: runner.os == 'Linux'
12+
shell: bash
13+
run: |
14+
if ! command -v mold >/dev/null; then
15+
sudo apt-get update
16+
sudo apt-get install -y mold
17+
fi
18+
# Use mold to handle long-range calls in the instrumented ARM64 binaries.
19+
echo "RUSTFLAGS=${RUSTFLAGS:-} -C link-arg=-fuse-ld=mold" >> "$GITHUB_ENV"

‎.github/scripts/build-fuzzers.sh‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ set -euo pipefail
66

77
mkdir -p fuzz-binaries
88

9-
if [[ "$(uname -s)" == Linux ]]; then
10-
# Use mold to handle long-range calls in the instrumented ARM64 binaries.
11-
export RUSTFLAGS="${RUSTFLAGS:-} -C link-arg=-fuse-ld=mold"
12-
fi
13-
149
FEATURES_FLAG=()
1510
if [ -n "${EXTRA_FEATURES:-}" ]; then
1611
FEATURES_FLAG=(--features "$EXTRA_FEATURES")

‎.github/scripts/close_fixed_fuzzer_issues.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,9 @@ def build_fuzz_target(target: str) -> bool:
162162
"""Build the fuzz target once. Returns True on success."""
163163
print(f"\nBuilding fuzz target: {target}")
164164
env = os.environ.copy()
165+
toolchain = env.get("NIGHTLY_TOOLCHAIN", "nightly")
165166
result = run(
166-
["cargo", "+nightly", "fuzz", "build", "--dev", "--sanitizer=none", target],
167+
["cargo", f"+{toolchain}", "fuzz", "build", "--dev", "--sanitizer=none", target],
167168
env=env,
168169
)
169170
return result.returncode == 0
@@ -172,11 +173,12 @@ def build_fuzz_target(target: str) -> bool:
172173
def retest_crash(target: str, crash_path: str, timeout_secs: int = 120) -> str:
173174
"""Run the fuzz target with the crash file. Returns 'fixed', 'reproduces', or 'timeout'."""
174175
env = os.environ.copy()
176+
toolchain = env.get("NIGHTLY_TOOLCHAIN", "nightly")
175177
try:
176178
result = run(
177179
[
178180
"cargo",
179-
"+nightly",
181+
f"+{toolchain}",
180182
"fuzz",
181183
"run",
182184
"--dev",

‎.github/workflows/close-fixed-fuzzer-issues.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646

4747
- uses: ./.github/actions/setup-fuzz-llvm
4848

49+
- uses: ./.github/actions/setup-fuzz-linker
50+
4951
- name: Install cargo-fuzz
5052
uses: taiki-e/cache-cargo-install-action@66c9585ef5ca780ee69399975a5e911f47905995
5153
with:

‎.github/workflows/fuzz-coverage.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ jobs:
5353
fi
5454
echo "Found llvm-profdata at $LLVM_PROFDATA"
5555
56+
- uses: ./.github/actions/setup-fuzz-linker
57+
5658
- name: Install cargo-fuzz
5759
uses: taiki-e/cache-cargo-install-action@66c9585ef5ca780ee69399975a5e911f47905995
5860
with:

‎.github/workflows/fuzz-regression.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
- "rust-toolchain.toml"
2424
- "fuzz/**"
2525
- ".github/actions/build-fuzzers/**"
26+
- ".github/actions/setup-fuzz-linker/**"
2627
- ".github/actions/setup-fuzz-llvm/**"
2728
- ".github/actions/setup-prebuild/**"
2829
- ".github/actions/setup-rust/**"

‎.github/workflows/fuzzer-fix-automation.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ jobs:
9292
with:
9393
compiler: llvm
9494

95+
- uses: ./.github/actions/setup-fuzz-linker
96+
9597
- name: Install cargo-fuzz
9698
uses: taiki-e/cache-cargo-install-action@66c9585ef5ca780ee69399975a5e911f47905995
9799
with:

‎.github/workflows/wasm-fuzz.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
echo "Checking for required wasmfuzz exports..."
5353
wasm-objdump -x target/wasm32-wasip1/release/array_ops_wasm.wasm | grep -E "(LLVMFuzzerTestOneInput|wasmfuzz_malloc|wasmfuzz_free)"
5454
55+
# Apply native linker flags only after building the WebAssembly target.
56+
- uses: ./.github/actions/setup-fuzz-linker
57+
5558
- name: Install wasmfuzz
5659
run: cargo install --git https://github.com/CISPA-SysSec/wasmfuzz --locked
5760

‎Cargo.lock‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)