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: unassignedb...@nondot.org
Reporter: dan433...@gmail.com
CC: llvm-bugs@lists.llvm.org, peter.sm...@linaro.org,
s...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs