Stream: git-wasmtime

Topic: wasmtime / issue #3022 Support 4GB memories instead of 4G...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 23 2021 at 15:32):

alexcrichton opened issue #3022:

Currently Wasmtime stores the current length of a memory as a u32 size in bytes, which means it can't represent the current length of memory if memory is exactly 4GB large (which takes 33 bits to represent). This means that Wasmtime only supports 4GB heaps minus one page, but we should ideally fix this issue to fully support a 4GB heap in the future.

Likely the main impact of this will be modifying JIT code to load/store a 64-bit value and/or multiplying the current_length by some factor. We know the length is always a multiple of wasm page size, so we could store the length as a multiple of that as well.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 02 2021 at 18:09):

alexcrichton closed issue #3022:

Currently Wasmtime stores the current length of a memory as a u32 size in bytes, which means it can't represent the current length of memory if memory is exactly 4GB large (which takes 33 bits to represent). This means that Wasmtime only supports 4GB heaps minus one page, but we should ideally fix this issue to fully support a 4GB heap in the future.

Likely the main impact of this will be modifying JIT code to load/store a 64-bit value and/or multiplying the current_length by some factor. We know the length is always a multiple of wasm page size, so we could store the length as a multiple of that as well.


Last updated: Oct 23 2024 at 20:03 UTC