Remove "unaligned" memory from fuzzing #11147
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.