[llvm-bugs] [Bug 41717] New: wasm-ld: error on signature mismatch in direct call?
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 2 13:24:19 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41717
Bug ID: 41717
Summary: wasm-ld: error on signature mismatch in direct call?
Product: lld
Version: unspecified
Hardware: Other
OS: other
Status: NEW
Severity: enhancement
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: dan433584 at gmail.com
CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
sbc at chromium.org
Forwarding a report from here:
https://github.com/CraneStation/wasi-sysroot/pull/21#issuecomment-488501838
The user had code which was calling qsort and srand with implicit declarations.
This works on native plaforms, but fails on wasm, because the actual
definitions have a "void" return type, while an implicit declaration has an
"i32" return type, so the wasm signatures don't match.
wasm-ld correctly printed a warning here, but it seems like it could issue a
hard error here, in the case of a direct call to a callee with a different
signature, because that leads to a wasm module that doesn't even validate.
--
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/20190502/5f2f0f05/attachment.html>
More information about the llvm-bugs
mailing list