Plugin Errors Propagating as segfault
wikiwong opened this issue · comments
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.
- Corrupt a wasm binary (you can delete a character in the middle of the file)
- 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
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.