-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into wasm-fuzzer
- Loading branch information
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ | |
[submodule "llvm"] | ||
path = llvm | ||
url = https://github.com/Jacarte/llvm-project | ||
branch = master | ||
branch = master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ LOCAL_WASM_DIR=/tmp/wasm | |
|
||
SWAM_SOCKET_HOST=localhost | ||
SWAM_SOCKET_PORT=9999 | ||
|
||
# Filter out WASI | ||
WASI_FILTER=True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
wasm-fuzzer/fuzzing-server-entry/entrypoint_mill_server.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# Get wasm/wat from $DOCKER_WASM directory | ||
WASM_OR_WAT_FILE=${DOCKER_WASM}/${WASM_EXECUTABLE} | ||
echo "WASM_OR_WAT_FILE: $WASM_OR_WAT_FILE" | ||
|
||
# Parse WASM_ARG_TYPES_LIST: "Int64,Int32" to "--argType Int64 --argType Int32" | ||
ALL_ARG_TYPES="" | ||
IFS=',' read -r -a array <<< "$WASM_ARG_TYPES_LIST" | ||
for element in "${array[@]}" | ||
do | ||
ALL_ARG_TYPES="$ALL_ARG_TYPES --argType $element" | ||
done | ||
echo "ALL_ARG_TYPES: $ALL_ARG_TYPES" | ||
|
||
if [[ $WASM_OR_WAT_FILE == *.wat ]]; then WAT_ARG="--wat"; fi | ||
if [[ $WASI == "True" ]]; then WASI_ARG="--wasi"; fi | ||
if [[ $WASI_FILTER == "True" ]]; then WASI_ARG="$WASI_ARG -r"; fi | ||
|
||
cd $DOCKER_SWAM_SRC | ||
|
||
# This also compiles the cli package in case source code / dependencies have changed: | ||
|
||
if [ ! -f cli-0.6.0-RC3.jar ]; then | ||
echo "No SWAM jar file !!. Exiting..." | ||
exit 1 | ||
fi | ||
echo "java -jar cli-0.6.0-RC3.jar run_server $WAT_ARG $WASI_ARG $ALL_ARG_TYPES --main $TARGET_FUNCTION $WASM_OR_WAT_FILE" # Avoiding WASI | ||
exec java -jar cli-0.6.0-RC3.jar run_server $WAT_ARG $WASI_ARG $ALL_ARG_TYPES --main $TARGET_FUNCTION $WASM_OR_WAT_FILE |