Skip to content

Conversation

@alexcrichton
Copy link
Member

This fixes the mistaken assumption that the tuple ABI in Rust is the same as the component model ABI and generates different code for lifting/lowering lists.

Closes #1112

This fixes the mistaken assumption that the tuple ABI in Rust is the
same as the component model ABI and generates different code for
lifting/lowering lists.

Closes bytecodealliance#1112
@sunfishcode
Copy link
Member

Is the issue here that the Rust tuple types are not repr(C), so they're using the Rust struct layout, which is probably packing the two s8s together?

@alexcrichton
Copy link
Member Author

Right yeah, and it mistakenly fell through the cracks in the check for "can we just use the raw list pointer as-is" so this PR fixes that by updating that check to explicitly go through manual lift/lower steps for lists-of-tuples

@alexcrichton alexcrichton added this pull request to the merge queue Jan 7, 2025
Merged via the queue into bytecodealliance:main with commit 19f259b Jan 7, 2025
25 checks passed
@alexcrichton alexcrichton deleted the fix-rust-tuple-abi branch January 7, 2025 19:40
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.

Rust: corrupted function argument of type list<tuple<s8, s64, s8>>

2 participants