Commit 89ffd740 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm] Update and run script to generate fuzzer corpus

The wasm fuzzer corpus is pretty outdated. The script that was used to
generate it did not work any more.
This CL updates the script, and runs it. This generates a fuzzer corpus
of 42011 wasm modules, compared to 15290 before. The new modules will
contain new features like SIMD and multi-value, which will be
interesting fuzzer inputs.

R=ahaas@chromium.org

Change-Id: Ic3df26930cb8c1c6e8d521597ceb06cc338c02ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2565512Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71537}
parent ca5e705f
f6b95b7dd8300efa84b6382f16cfcae4ec9fa108
\ No newline at end of file
a1493bb387aed38462c49f4351dc47e79e4b784b
\ No newline at end of file
......@@ -3,40 +3,29 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
set -ex
TOOLS_WASM_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$( dirname "${BASH_SOURCE[0]}" )"
cd ../..
cd ${TOOLS_WASM_DIR}/../..
BUILD_DIR=out/mk_wasm_fuzzer_corpus
CORPUS_DIR=test/fuzzer/wasm_corpus
rm -rf test/fuzzer/wasm_corpus
rm -rf $BUILD_DIR $CORPUS_DIR
mkdir -p $CORPUS_DIR
tools/dev/gm.py x64.release all
# Build optdebug such that the --dump-wasm-module flag is available.
gn gen $BUILD_DIR --args='is_debug=true v8_optimized_debug=true target_cpu="x64" use_goma=true'
autoninja -C $BUILD_DIR
mkdir -p test/fuzzer/wasm_corpus
./tools/run-tests.py --outdir=$BUILD_DIR --extra-flags="--dump-wasm-module \
--dump-wasm-module-path=./$CORPUS_DIR/"
# wasm
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
--mode=release --no-presubmit --extra-flags="--dump-wasm-module \
--dump-wasm-module-path=./test/fuzzer/wasm_corpus/" unittests
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
--mode=release --no-presubmit --extra-flags="--dump-wasm-module \
--dump-wasm-module-path=./test/fuzzer/wasm_corpus/" wasm-spec-tests/*
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
--mode=release --no-presubmit --extra-flags="--dump-wasm-module \
--dump-wasm-module-path=./test/fuzzer/wasm_corpus/" mjsunit/wasm/*
./tools/run-tests.py -j8 --variants=default --timeout=10 --arch=x64 \
--mode=release --no-presubmit --extra-flags="--dump-wasm-module \
--dump-wasm-module-path=./test/fuzzer/wasm_corpus/" \
$(cd test/; ls cctest/wasm/test-*.cc | \
sed -es/wasm\\///g | sed -es/[.]cc/\\/\\*/g)
rm -rf $BUILD_DIR
# Delete items over 20k.
for x in $(find ./test/fuzzer/wasm_corpus/ -type f -size +20k)
do
rm $x
done
find $CORPUS_DIR -type f -size +20k | xargs rm
# Upload changes.
cd test/fuzzer
cd $CORPUS_DIR/..
upload_to_google_storage.py -a -b v8-wasm-fuzzer wasm_corpus
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment