Skip to content

Status of Wasmi and WAMR run-time engines #6344

@marxin

Description

@marxin

With the attached feature enabling patch, there seems to be multiple memory crashes related to Wasmi and WAMR run-times:

Running `target/debug/wasmer run --wamr /home/marxin/Programming/testcases/cowsay.wat 1`
⠉ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ Compiling module (535B8C90)[17:35:36:754 - 7FEEA40E0FC0]: failed to link function (wasi_snapshot_preview1, fd_write): WASM module instantiate failed: unknown import
[17:35:36:754 - 7FEEA40E0FC0]: failed to link function (wasi_snapshot_preview1, args_sizes_get): WASM module instantiate failed: unknown import
[17:35:36:754 - 7FEEA40E0FC0]: failed to link function (wasi_snapshot_preview1, args_get): WASM module instantiate failed: unknown import
[17:35:36:754 - 7FEEA40E0FC0]: failed to link function (wasi_snapshot_preview1, fd_read): WASM module instantiate failed: unknown import
[17:35:36:754 - 7FEEA40E0FC0]: failed to link function (wasi_snapshot_preview1, random_get): WASM module instantiate failed: unknown import
[17:35:36:754 - 7FEEA40E0FC0]: failed to link function (wasi_snapshot_preview1, environ_get): WASM module instantiate failed: unknown import
[17:35:36:754 - 7FEEA40E0FC0]: failed to link function (wasi_snapshot_preview1, environ_sizes_get): WASM module instantiate failed: unknown import
[17:35:36:754 - 7FEEA40E0FC0]: failed to link function (wasi_snapshot_preview1, proc_exit): WASM module instantiate failed: unknown import
 ___
< 1 >
 ---
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
               ||----w |
                ||     ||

thread 'TokioTaskManager Thread Pool_thread_1' (1680137) panicked at lib/api/src/backend/wamr/entities/function/mod.rs:411:38:
unsafe precondition(s) violated: slice::from_raw_parts requires the pointer to be aligned and non-null, and the total size of the slice not to exceed `isize::MAX`

This indicates a bug in the program. This Undefined Behavior check is optional, and cannot be relied on for safety.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread caused non-unwinding panic. aborting.
...
❯ cat ~/Programming/testcases/hw.wat
(module
  (func $main (export "_start") (result i32) i32.const 42)
  )
❯ cat ~/Programming/testcases/hw.wat
(module
  (func $main (export "_start") (result i32) i32.const 42)
  )

wasmi-wamr-features.patch.txt

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions