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.
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: Nov 22 2024 at 16:03 UTC