[llvm-bugs] [Bug 45645] New: Using --relocatable with mismatching function signatures crashes
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 23 00:29:28 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45645
Bug ID: 45645
Summary: Using --relocatable with mismatching function
signatures crashes
Product: lld
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: wasm
Assignee: unassignedbugs at nondot.org
Reporter: aheejin at gmail.com
CC: llvm-bugs at lists.llvm.org, oeysymontt at gmail.com,
sbc at chromium.org
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
--
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/20200423/73841ab6/attachment.html>
More information about the llvm-bugs
mailing list