Stream: git-wasmtime

Topic: wasmtime / PR #3819 Update memfd image construction to av...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 16 2022 at 22:25):

alexcrichton opened PR #3819 from less-memory-on-compile to main:

Previously memfd-based image construction had a hard limit of a 1GB
memory image but this mean that tiny wasm modules could allocate up to
1GB of memory which became a bit excessive especially in terms of memory
usage during fuzzing. To fix this the conversion to a static memory
image has been updated to first do a conversion to paged memory
initialization, which is sparse, followed by a second conversion to
static memory initialization.

The sparse construction for the paged step should make it such that the
upper/lower bounds of the initialization image are easily computed, and
then afterwards this limit can be checked against some heuristics to
determine if we're willing to commit to building up a whole static image
for that module. The heuristics have been tweaked from "must be less
than 1GB" to one of two conditions must be true:

We'll likely need to tweak this over time and it's still possible to
cause a lot of extra memory consumption, but for now this should be
enough to appease the fuzzers.

Closes #3815

<!--

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 (Feb 16 2022 at 23:08):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 16 2022 at 23:08):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 16 2022 at 23:08):

cfallin created PR review comment:

Constant for this?

view this post on Zulip Wasmtime GitHub notifications bot (Feb 16 2022 at 23:08):

cfallin created PR review comment:

s/theortetically/theoretically/

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

alexcrichton updated PR #3819 from less-memory-on-compile to main.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 17 2022 at 16:37):

alexcrichton merged PR #3819.


Last updated: Nov 22 2024 at 16:03 UTC