Skip to content

Use table's index type when parsing element segments#8380

Merged
stevenfontanella merged 1 commit intomainfrom
fix-call-indirect64
Feb 25, 2026
Merged

Use table's index type when parsing element segments#8380
stevenfontanella merged 1 commit intomainfrom
fix-call-indirect64

Conversation

@stevenfontanella
Copy link
Member

@stevenfontanella stevenfontanella commented Feb 25, 2026

Resolves the spec test error in call_indirect64.wast:

run_command `/usr/local/google/home/stevenfont/code/binaryen3/bin/wasm-shell /usr/local/google/home/stevenfont/code/binaryen3/test/spec/testsuite/call_indirect64.wast` failed (1) 0 BUILDING MODULE [line: 3]
[wasm-validator error in module] i32 != i64: element segment offset must match table index type, on
(i32.const 0)
failed validation

Previously we always assumed a 32-bit index even if the table is 64 bits. Use the index type of the table during parsing.

Part of #8261.

@stevenfontanella stevenfontanella changed the title Fix call indirect 64 spec test Use table's index type when parsing element segments Feb 25, 2026
@stevenfontanella stevenfontanella marked this pull request as ready for review February 25, 2026 22:46
@stevenfontanella stevenfontanella merged commit fb7b2c5 into main Feb 25, 2026
17 checks passed
@stevenfontanella stevenfontanella deleted the fix-call-indirect64 branch February 25, 2026 22:59
@stevenfontanella stevenfontanella linked an issue Feb 25, 2026 that may be closed by this pull request
78 tasks
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.

Improve interpreter spec test coverage

2 participants