v8/tools/wasm/update-wasm-fuzzers.sh
Clemens Backes 89ffd740cd [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/+/2565512
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71537}
2020-12-01 16:21:51 +00:00

32 lines
857 B
Bash
Executable File

#!/bin/bash
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -ex
cd "$( dirname "${BASH_SOURCE[0]}" )"
cd ../..
BUILD_DIR=out/mk_wasm_fuzzer_corpus
CORPUS_DIR=test/fuzzer/wasm_corpus
rm -rf $BUILD_DIR $CORPUS_DIR
mkdir -p $CORPUS_DIR
# 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
./tools/run-tests.py --outdir=$BUILD_DIR --extra-flags="--dump-wasm-module \
--dump-wasm-module-path=./$CORPUS_DIR/"
rm -rf $BUILD_DIR
# Delete items over 20k.
find $CORPUS_DIR -type f -size +20k | xargs rm
# Upload changes.
cd $CORPUS_DIR/..
upload_to_google_storage.py -a -b v8-wasm-fuzzer wasm_corpus