alexcrichton opened PR #12022 from alexcrichton:ghsa-main to bytecodealliance:main:
This commit fixes a few issues where it was possible to represent a wasm shared linear memory with the
wasmtime::Memorytype. This is not sound becausewasmtime::Memoryprovides safe Rust access to the bytes where that is not possible with wasm shared memories. Shared memories in Rust must be represented bySharedMemory, notwasmtime::Memory.Specifically this commit prevents two vectors of this happening:
Memory::newnow requires that the memory type specified is non-shared. InsteadSharedMemory::newmust be used instead.Core dumps now skip over shared memories when iterating over all memories in the store. Supporting shared memories is left to a future feature request for now.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested dicej for a review on PR #12022.
alexcrichton requested wasmtime-core-reviewers for a review on PR #12022.
alexcrichton updated PR #12022.
tschneidereit submitted PR review.
alexcrichton merged PR #12022.
Last updated: Dec 06 2025 at 07:03 UTC