Stream: git-wasmtime

Topic: wasmtime / issue #735 [lightbeam/wasmtime] assertion fail...


view this post on Zulip Wasmtime GitHub notifications bot (Sep 27 2021 at 17:29):

alexcrichton commented on issue #735:

Lightbeam was removed in https://github.com/bytecodealliance/wasmtime/pull/3390 as explained in RFC 14, so I'm going to close this.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 27 2021 at 17:29):

alexcrichton closed issue #735:

Issue description

A call to assert! make wasmtime to panic (on both backends) when the memory is shared.

$ ./target/release/wasmtime assert_mt_failed.wasm
thread 'main' panicked at 'assertion failed: !mt.shared', crates/api/src/module.rs:14:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
$ ./target/release/wasmtime --lightbeam assert_mt_failed.wasm
thread 'main' panicked at 'assertion failed: !mt.shared', crates/api/src/module.rs:14:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

This issue is related to the following piece of code:
https://github.com/bytecodealliance/wasmtime/blob/31472fbb5a6417ea3d9eb10417ff5ea49712998a/crates/api/src/module.rs#L13-L16

Reproduction

Download assert_mt_failed.zip

or wasm2wat --enable-all assert_mt_failed.wasm:

(module
  (type (;0;) (func))
  (type (;1;) (func (result i32)))
  (func (;0;) (type 0)
    i32.const 0
    memory.grow
    i32.load8_u
    i64.load8_s offset=119
    memory.size
    unreachable)
  (func (;1;) (type 0)
    i32.const 0
    nop
    call 0
    unreachable)
  (func (;2;) (type 0)
    call 0
    call 0
    call 0)
  (memory (;0;) 1 1 shared)
  (export "w1c" (func 0))
  (export "get" (func 1))
  (start 2)
  (data (;0;) (i32.const 0) "A"))

Note: this testcase can be even more minimized.

Build wasmtime with lightbeam:

$ RUSTFLAGS=-g cargo build --release --features lightbeam

wasmtime commit: 31472fbb5a6417ea3d9eb10417ff5ea49712998a


Last updated: Nov 22 2024 at 16:03 UTC