rvolosatovs opened PR #14626 from rvolosatovs:fix/err-ctx-align to bytecodealliance:main:
error-context.debug-messagebounds-checked the guest-provided destination pointer for the string's(ptr, len)pair, but not its alignment, and then wrote the pair via
<str as Lower>::linear_lower_to_memory, whichdebug_assert!s that the offset is 4-byte aligned. A guest passing an in-bounds but misaligned pointer could therefore panic the host in debug builds, while release builds performed the unaligned write.Check the pointer's alignment before lowering and trap with "invalid debug message pointer: not aligned", the same way the stream/future read and write paths in this file report misaligned pointers.
rvolosatovs requested dicej for a review on PR #14626.
rvolosatovs requested wasmtime-core-reviewers for a review on PR #14626.
rvolosatovs has enabled auto merge for PR #14626.
:thumbs_up: alexcrichton submitted PR review.
rvolosatovs added PR #14626 component(err-ctx): trap on a misaligned pointer to the merge queue.
:check: rvolosatovs merged PR #14626.
rvolosatovs removed PR #14626 component(err-ctx): trap on a misaligned pointer from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC