peterhuene opened PR #3782 from fix-pooling-allocator to main:
This PR corrects a few places where
MemoryIndexwas used and treated like
aDefinedMemoryIndexin the pooling instance allocator.When the unstable
multi-memoryproposal 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-memoryproposal, 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
MemoryIndexwithDefinedMemoryIndexin
the pooling instance allocator.Several
debug_assert!have also been updated toassert!to sanity check the
state of the pooling allocator even in release builds.
peterhuene requested cfallin for a review on PR #3782.
peterhuene requested alexcrichton for a review on PR #3782.
alexcrichton submitted PR review.
alexcrichton merged PR #3782.
Last updated: Dec 06 2025 at 06:05 UTC