<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - wasm-ld: error on signature mismatch in direct call?"
href="https://bugs.llvm.org/show_bug.cgi?id=41717">41717</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>wasm-ld: error on signature mismatch in direct call?
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>other
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dan433584@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org, sbc@chromium.org
</td>
</tr></table>
<p>
<div>
<pre>Forwarding a report from here:
<a href="https://github.com/CraneStation/wasi-sysroot/pull/21#issuecomment-488501838">https://github.com/CraneStation/wasi-sysroot/pull/21#issuecomment-488501838</a>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>