Stream: git-wasmtime

Topic: wasmtime / PR #3782 Fix incorrect use of `MemoryIndex` in...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 09 2022 at 05:04):

peterhuene opened PR #3782 from fix-pooling-allocator to main:

This PR corrects a few places where MemoryIndex was used and treated like
a DefinedMemoryIndex in the pooling instance allocator.

When the unstable multi-memory proposal is enabled, it is possible to cause a
newly allocated instance to use an incorrect base address for any defined
memories by having the module being instantiated also import a memory.

This requires enabling the unstable multi-memory proposal, configuring the
use of the pooling instance allocator (not the default), and then configuring
the module limits to allow imported memories (also not the default).

The fix is to replace all uses of MemoryIndex with DefinedMemoryIndex in
the pooling instance allocator.

Several debug_assert! have also been updated to assert! to sanity check the
state of the pooling allocator even in release builds.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 09 2022 at 05:04):

peterhuene requested cfallin for a review on PR #3782.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 09 2022 at 05:04):

peterhuene requested alexcrichton for a review on PR #3782.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 09 2022 at 15:39):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 09 2022 at 15:39):

alexcrichton merged PR #3782.


Last updated: Oct 23 2024 at 20:03 UTC