Stream: git-wasmtime

Topic: wasmtime / PR #11147 Remove "unaligned" memory from fuzzing


view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2025 at 14:57):

alexcrichton opened PR #11147 from alexcrichton:jettison-unaligned-memory to bytecodealliance:main:

This commit removes the configuration knob used during fuzzing to use a custom host memory which is always unaligned on the host. The original intention for this was to help catch issues related to alignment in the x64 backend about, for example, performing unaligned SSE loads correctly (as opposed to accidentally faulting on unaligned addresses).

As shown in the test failures of #11142, however, this is technically UB for other parts of Wasmtime that assume the heap addresses are always aligned. For example Wasmtime will create safe references in to a GC heap and GC heaps are also allocated with this same allocator, meaning that Rust-safe references are unaligned (which is UB).

In practice I'm not aware of any actual issues this configuration option has ever discovered, and we've otherwise discovered alignment issues via normal fuzzing as well. Given that I think it's best to just jettison this entirely and stop trying to support it and/or tweak configuration to only use it when supported or similar.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2025 at 14:57):

alexcrichton requested fitzgen for a review on PR #11147.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2025 at 14:57):

alexcrichton requested wasmtime-fuzz-reviewers for a review on PR #11147.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2025 at 16:45):

fitzgen submitted PR review:

Yep, makes total sense.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2025 at 17:08):

fitzgen merged PR #11147.


Last updated: Dec 06 2025 at 07:03 UTC