[llvm-bugs] [Bug 37546] New: wasm32: Invalid wasm file generated at O0 on call signature
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 21 15:37:20 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37546
Bug ID: 37546
Summary: wasm32: Invalid wasm file generated at O0 on call
signature
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: WebAssembly
Assignee: unassignedbugs at nondot.org
Reporter: alex at crichton.co
CC: dan433584 at gmail.com, llvm-bugs at lists.llvm.org,
sbc at chromium.org
Created attachment 20328
--> https://bugs.llvm.org/attachment.cgi?id=20328&action=edit
IR
Originally reported at https://github.com/rustwasm/wasm-bindgen/issues/199 this
bug then transitioned into https://github.com/rust-lang/rust/issues/50869 where
I've been able to reduce this a bit to hopefully be in a reportable state for
LLVM itself.
The attached IR, when run through `llc` at O0, will generate a wasm object file
which fails to pass `wasm-validate`:
$ llc foo.ll -O0 -filetype=obj -o foo.o
$ wasm-validate --enable-mutable-globals foo.o
--ignore-custom-section-errors
tmp.o:0000b36: error: type mismatch in call, expected [i32, i32] but got
[i32]
I think this appears to be the root cause for causing the final linked module
to become invalid as well. Note that the attached IR is also reduced via
bugpoint so it may look a little odd. If there's any questions about this
though, please feel free to let me know!
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180521/25fa3a8d/attachment.html>
More information about the llvm-bugs
mailing list