peterhuene opened PR #3782 from fix-pooling-allocator
to main
:
This PR corrects a few places where
MemoryIndex
was used and treated like
aDefinedMemoryIndex
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
withDefinedMemoryIndex
in
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 23 2024 at 12:05 UTC