Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/ci/miri-wast.sh
1685 views
1
#!/bin/bash
2
3
# Helper script to execute a `*.wast` test in Miri. This is only lightly used on
4
# CI and is provided here to assist with development of anything that ends up
5
# using unsafe for example.
6
#
7
# Example usage is:
8
#
9
# ./ci/miri-wast.sh ./tests/spec_testsuite/br_if.wast
10
#
11
# extra flags to this script are passed to `cargo run wast` which means they
12
# must be suitable flags for the `wast` subcommand.
13
14
set -ex
15
16
rm -rf ./miri-wast
17
mkdir ./miri-wast
18
cargo run -- wast --target pulley64 --precompile-save ./miri-wast "$@" \
19
-O memory-reservation=$((1 << 20)) \
20
-O memory-guard-size=0 \
21
-O signals-based-traps=n \
22
-O memory-init-cow=n
23
24
MIRIFLAGS="$MIRIFLAGS -Zmiri-disable-isolation -Zmiri-permissive-provenance" \
25
cargo miri run -- wast -Ccache=n --target pulley64 --precompile-load ./miri-wast "$@" \
26
-O memory-init-cow=n
27
28