WebAssembly calling convention impl incorrectly uses make_indirect_byval() #130442
Labels
A-ABI
Area: Concerning the application binary interface (ABI)
C-bug
Category: This is a bug.
O-wasm
Target: WASM (WebAssembly), http://webassembly.org/
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
It should use
make_indirect()
instead. It seems like LLVM ignoressarg
on WebAssembly, so it happens to work out fine in the end with the LLVM backend at least, but it is still incorrect per https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md.For those unaware the difference between the two is that
make_indirect()
will pass a pointer to the argument somewhere, whilemake_indirect_byval()
is supposed to store the argument at a fixed location on the stack.The text was updated successfully, but these errors were encountered: