Stream: git-wasmtime

Topic: wasmtime / PR #14884 wasi-nn: trap instead of panicking o...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 12:09):

netliomax25-code opened PR #14884 from netliomax25-code:wasi-nn-witx-guest-error-trap to bytecodealliance:main:

The WITX wasi-nn host panics when a guest passes a bad pointer or a non-UTF-8 string, because nn_errno_from_wasi_nn_error hits unimplemented!() for WasiNnError::GuestError. For example, load_by_name with a name pointer past the end of linear memory takes down the host with "not implemented: guest error conversion" instead of failing the call.

This returns the GuestError as a trap. Invalid enum arguments already trap in the wiggle glue, and WASIp1 traps on out-of-bounds pointers, so this follows the same model. The new unit test calls load_by_name with an out-of-bounds pointer and with invalid UTF-8; it panics before this change and passes after.

Tested with cargo test -p wasmtime-wasi-nn --lib, with and without default features.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 12:09):

netliomax25-code removed the review request for wasmtime-wasi-reviewers from PR #14884.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 12:09):

netliomax25-code requested rvolosatovs for a review on PR #14884.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 12:09):

netliomax25-code requested wasmtime-wasi-reviewers for a review on PR #14884.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 15:03):

alexcrichton commented on PR #14884:

cc @rahulchaphalkar @jlb6740

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 20:28):

alexcrichton added the label wasi-nn on PR #14884.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2026 at 20:32):

alexcrichton removed the review request for rvolosatovs from PR #14884.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 20:50):

:thumbs_up: rahulchaphalkar submitted PR review:

LGTM, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 20:51):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 20:51):

alexcrichton added PR #14884 wasi-nn: trap instead of panicking on guest memory errors to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 21:15):

:check: alexcrichton merged PR #14884.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 21 2026 at 21:15):

alexcrichton removed PR #14884 wasi-nn: trap instead of panicking on guest memory errors from the merge queue.


Last updated: Oct 31 2026 at 23:03 UTC