Skip to content

mark-pictor-csec/wazero_rust_crash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eh?

Just trying to get to the bottom of a crash in a wasm module built from rust, when run via wazero.

quick start

go run ./cmd -release
  • wasm is compiled, and additional memory is alloc'd for wasm
  • wasm func exits with unreachable error and stack trace
go run ./cmd -release -interp
  • interpreted rather than compiled
  • wasm func is successful
go run ./cmd -release -nomem
  • no extra memory is allocated
  • wasm func is successful

versions


$ rustc --version rustc 1.78.0 (9b00956e5 2024-04-29)

$ go version go version go1.22.0 darwin/amd64


wasm v1.7.1

## files
* `crates/wazero-crash-lib/src/main.rs`: code for wasm module
  * can also run as native:
    * `cargo run`
    * `cargo run --release`
* `target/wasm32-wasi/*/*.wasm`: debug and release build of module, built with rust `1.78.0`
* `cmd/main.go`: builds and runs the wasm module, calling the exported function `regex()`
  * flags:
    * `-skipbuild`: do not try to build wasm
    * `-release`: build/run release build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages