bytecodealliance / bytecodealliance/wasmtime

Fixed length lists in FACT don't handle the memory64 proposal

Open
#13,025 0 comments 0 reactions 0 assignees View on GitHub
wasm-proposal:component-model
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

This is a bit of a future-facing concern since memory64 doesn't currently work with components (but that may change in the near-ish future). Much of the rest of FACT is designed to support memory64 eventually, however, and I figured it'd be good to log this as an issue.

Specifically [the count of items left to process](https://github.com/bytecodealliance/wasmtime/blob/38c2e2a87d592680b62a0de07e379bda45e9e3b2/crates/environ/src/fact/trampoline.rs#L3178-L3179) is an i32 while later [pointer-sized operations are used to manipulate it](https://github.com/bytecodealliance/wasmtime/blob/38c2e2a87d592680b62a0de07e379bda45e9e3b2/crates/environ/src/fact/trampoline.rs#L3208-L3211). This'll want to get fixed.

When fixing this it'd be good to be sure this is caught by the [fact-valid-module.rs fuzzer](https://github.com/bytecodealliance/wasmtime/blob/main/crates/environ/fuzz/fuzz_targets/fact-valid-module.rs) and/or ensure it's up-to-date. Support for fixed-length-lists probably wants to be added there too.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.