Skip to content

fix: signature lowering for strings and lists on modules with 64bit memory#2544

Open
christoph-dfinity wants to merge 3 commits into
bytecodealliance:mainfrom
christoph-dfinity:memory64-string
Open

fix: signature lowering for strings and lists on modules with 64bit memory#2544
christoph-dfinity wants to merge 3 commits into
bytecodealliance:mainfrom
christoph-dfinity:memory64-string

Conversation

@christoph-dfinity

@christoph-dfinity christoph-dfinity commented Jun 23, 2026

Copy link
Copy Markdown

Fixes signature lowering for strings and lists on modules with 64bit memory.

Before this change the newly added tests fail with a signature mismatch, because the lowering unconditionally produced i32 pointers and lengths. On modules with 64bit memories these need to be i64 instead, based on my reading of the Canonical ABI document

Before the fix the tests fail with:

---- "tests/cli/component-model/memory64/string.wast" ----
failed test "tests/cli/component-model/memory64/string.wast"
...
       Caused by:
           0: failed testing wasm binary produced by `wast`
           1: wasm isn't valid
           2: lowered parameter types `[I32, I32]` do not match parameter types `[I64, I64]` of core function 0 (at offset 0x8f)

/cc @michael-weigelt

@christoph-dfinity christoph-dfinity changed the title WIP: adds a test-case for lowering/lifting of 64bit string functions fix: signature lowering for strings and lists on modules with 64bit memory Jun 25, 2026
@christoph-dfinity christoph-dfinity marked this pull request as ready for review June 25, 2026 10:55
@christoph-dfinity christoph-dfinity requested a review from a team as a code owner June 25, 2026 10:55
@christoph-dfinity christoph-dfinity requested review from pchickey and removed request for a team June 25, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant