Skip to content

Commit

Permalink
Slightly change build process to prevent OOM (#14965)
Browse files Browse the repository at this point in the history
  • Loading branch information
zi0Black authored Oct 15, 2024
1 parent b97a30a commit 184ece9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions testsuite/fuzzer/fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,18 @@ function build-oss-fuzz() {
ld.lld --version
clang --version

if ! build all ./target; then
env
error "Build failed. Exiting."
fi
# Limit the number of parallel jobs to avoid OOM
# export CARGO_BUILD_JOBS = 3

# Build the fuzz targets
# Doing one target at the time should prevent OOM, but use all thread while bulding dependecies
for fuzz_target in $(list); do
if ! build $fuzz_target ./target ; then
env
error "Build failed. Exiting."
fi
done

find ./target/*/release/ -maxdepth 1 -type f -perm /111 -exec cp {} $oss_fuzz_out \;

# Download corpus zip
Expand Down

0 comments on commit 184ece9

Please sign in to comment.