extism / extism

The framework for building with WebAssembly (wasm). Easily load wasm modules, move data, call functions, and build extensible apps.

Home Page:https://extism.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin Errors Propagating as segfault

wikiwong opened this issue · comments

commented

As exposed in dylibso/modsurfer#64, errors that are occurring in Extism plugins running within a Rust SDK @ v0.5.4 are propagating to the host as segfaults instead of their actual underlying error.

An Extism error can be triggered using Modsurfer as described in the above issue.

  1. Corrupt a wasm binary (you can delete a character in the middle of the file)
  2. Try to generate a checkfile for the corrupt binary using the modsurfer CLI: cargo run -- generate -p /path/to/corrupt.wasm

Expected:
This message sent to stdout should contain some text describing an EOF: unexpected end-of-file

Actual:
The message is:

[1]    89489 segmentation fault (core dumped)  cargo run -- generate -p ~/wasm/cowsay.instr.wasm

Keep for testing prior to 1.0 launch

commented

This has been fixed after moving over to tracing, it seems like this was an issue with logging in another thread after the program had already been stopped.