<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 - Using --relocatable with mismatching function signatures crashes"
href="https://bugs.llvm.org/show_bug.cgi?id=45645">45645</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Using --relocatable with mismatching function signatures crashes
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>wasm
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>aheejin@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, oeysymontt@gmail.com, sbc@chromium.org
</td>
</tr></table>
<p>
<div>
<pre>When function return types mismatch between its definition and declaration, if
we pass '--relocatable' to wasm-ld, it crashes. If we don't use '--relocatable'
it only prints warnings but runs successfully.
- Test cases:
main.c:
int test(int);
int main() {
test(1);
return 0;
}
test.c:
void test (int n) {
}
- Commands to reproduce:
emcc -c test.c (You can use clang too)
emcc -c main.c
wasm-ld --relocatable test.o main.o -o t.so
- Error message:
wasm-ld: ../lld/wasm/Symbols.cpp:144: uint32_t
lld::wasm::Symbol::getOutputSymbolIndex() const: Assertion `outputSymbolIndex
!= INVALID_INDEX' failed</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>