Skip to content

Commit 7861263

Browse files
authored
Merge pull request #1944 from coolreader18/enable-wasm-throw-test
Enable assert_instr for wasm32 throw
2 parents e3accfc + 75dceb8 commit 7861263

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ci/docker/wasm32-wasip1/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends \
77
xz-utils \
88
clang
99

10-
ENV VERSION=v34.0.1
10+
ENV VERSION=v38.0.3
1111

1212
RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/${VERSION}/wasmtime-${VERSION}-x86_64-linux.tar.xz | tar xJf -
1313
ENV PATH=$PATH:/wasmtime-${VERSION}-x86_64-linux
1414

15-
ENV CARGO_TARGET_WASM32_WASIP1_RUNNER="wasmtime --dir /checkout/target/wasm32-wasip1/release/deps::."
15+
ENV CARGO_TARGET_WASM32_WASIP1_RUNNER="wasmtime -Wexceptions --dir /checkout/target/wasm32-wasip1/release/deps::."

crates/core_arch/src/wasm32/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,7 @@ unsafe extern "C-unwind" {
185185
///
186186
/// [`throw`]: https://webassembly.github.io/exception-handling/core/syntax/instructions.html#syntax-instr-control
187187
/// [exception-handling proposal]: https://github.com/WebAssembly/exception-handling
188-
// FIXME: wasmtime does not currently support exception-handling, so cannot execute
189-
// a wasm module with the throw instruction in it. once it does, we can
190-
// reenable this attribute.
191-
// #[cfg_attr(test, assert_instr(throw, TAG = 0, ptr = core::ptr::null_mut()))]
188+
#[cfg_attr(test, assert_instr(throw, TAG = 0, ptr = core::ptr::null_mut()))]
192189
#[inline]
193190
#[unstable(feature = "wasm_exception_handling_intrinsics", issue = "122465")]
194191
// FIXME: Since this instruction unwinds, `core` built with `-C panic=unwind`

0 commit comments

Comments
 (0)