Skip to content

Commit

Permalink
examples/fuzz: add a script to generate seed with wasm-tools
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jun 16, 2024
1 parent 369953c commit 83ca0f6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/fuzz/seed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#! /bin/sh

set -e

WASM_TOOLS=${WASM_TOOLS:-wasm-tools}
SEED_DIR=seed
mkdir -p ${SEED_DIR}
for x in $(seq 10000); do
dd if=/dev/urandom bs=10240 count=100 2> /dev/null | ${WASM_TOOLS} smith \
--max-imports=8 \
--allow-invalid-funcs=true \
--reference-types-enabled=true \
--simd-enabled=true \
-o ${SEED_DIR}/$x
done

0 comments on commit 83ca0f6

Please sign in to comment.