Skip to content

Commit 8f14e99

Browse files
committed
feat: add fuzzer build check before reproduction
Build the fuzzer target before attempting to reproduce the crash to ensure it compiles. This catches compilation errors early and saves time by not attempting reproduction if the code doesn't build. Signed-off-by: Joe Isaacs <[email protected]>
1 parent 97d7bc6 commit 8f14e99

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,25 @@ jobs:
156156
echo "✅ Downloaded crash file: $CRASH_FILE_PATH"
157157
echo "crash_file_path=$CRASH_FILE_PATH" >> $GITHUB_OUTPUT
158158
159+
- name: Build fuzzer target
160+
id: build
161+
run: |
162+
echo "Building fuzzer target: ${{ steps.extract.outputs.target }}"
163+
164+
# Build the fuzzer target to ensure it compiles
165+
if cargo +nightly fuzz build --sanitizer=none "${{ steps.extract.outputs.target }}" 2>&1 | tee fuzzer_build.log; then
166+
echo "✅ Fuzzer target built successfully"
167+
echo "build_success=true" >> $GITHUB_OUTPUT
168+
else
169+
echo "❌ Fuzzer target failed to build"
170+
echo "build_success=false" >> $GITHUB_OUTPUT
171+
172+
# Show the build errors
173+
echo "Build errors:"
174+
tail -50 fuzzer_build.log
175+
exit 1
176+
fi
177+
159178
- name: Reproduce crash
160179
id: reproduce
161180
continue-on-error: true

0 commit comments

Comments
 (0)