Stream: git-wasmtime

Topic: wasmtime / PR #4209 Fix double-counting imports in `VMOff...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:28):

alexcrichton opened PR #4209 from fix-vmcontext-size-with-improts to main:

This fixes an oversight in the initial creation of VMOffsets for a
module to avoid double-counting imported globals, tables, and memories
for calculating the size of the VMContext. Prior to this PR imported
items are accidentally also counted as defined items for sizing
calculations meaning that when a memory is imported but not defined, for
example, the VMContext will have a space for an inline
VMMemoryDefinition when it doesn't need to.

Auditing where all this relates to it appears that the only issue from
this mistake is that VMContext is a bit larger than it would otherwise
need to be. Extra slots are uninitialized memory but nothing in Wasmtime
ever actually accesses the memory either, so it should be harmless to
have extra space here. Nevertheless it seems better to shrink the size
as much as possible to avoid wasting space where we can.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:28):

alexcrichton updated PR #4209 from fix-vmcontext-size-with-improts to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:35):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 17:53):

alexcrichton updated PR #4209 from fix-vmcontext-size-with-improts to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2022 at 18:39):

alexcrichton merged PR #4209.


Last updated: Dec 23 2024 at 13:07 UTC