| Issue |
55504
|
| Summary |
[wasm] LLVM ERROR: only one .init_array section fragment supported
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
juj
|
The test case in https://github.com/llvm/llvm-project/issues/55111#issuecomment-1127491075 produces a crash
```
LLVM ERROR: only one .init_array section fragment supported
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: E:/code/emsdk/llvm/git/build_main_vs2019_64/RelWithDebInfo/bin/wasm-ld.exe -o out.wasm @wasm_files.txt --export-if-defined=main --no-entry C:\\Users\\jukkaj\\AppData\\Local\\Temp\\llvm-reduce-e363f2.bc
#0 0x00007ff790043ab5 HandleAbort E:\code\emsdk\llvm\git\src\llvm\lib\Support\Windows\Signals.inc:418:0
#1 0x00007fff84601891 (C:\WINDOWS\System32\ucrtbase.dll+0x71891)
#2 0x00007fff84602861 (C:\WINDOWS\System32\ucrtbase.dll+0x72861)
#3 0x00007ff790036936 llvm::report_fatal_error(class llvm::Twine const &, bool) E:\code\emsdk\llvm\git\src\llvm\lib\Support\ErrorHandling.cpp:122:0
#4 0x00007ff7900369a1 llvm::report_fatal_error(char const *, bool) E:\code\emsdk\llvm\git\src\llvm\lib\Support\ErrorHandling.cpp:83:0
#5 0x00007ff792422939 `anonymous namespace'::WasmObjectWriter::writeOneObject E:\code\emsdk\llvm\git\src\llvm\lib\MC\WasmObjectWriter.cpp:1868:0
#6 0x00007ff7924203f2 `anonymous namespace'::WasmObjectWriter::writeObject E:\code\emsdk\llvm\git\src\llvm\lib\MC\WasmObjectWriter.cpp:1453:0
#7 0x00007ff7923c1e3a ::{dtor} E:\code\emsdk\llvm\git\src\llvm\include\llvm\ADT\DenseMap.h:756:0
#8 0x00007ff7923c1e3a llvm::MCAssembler::Finish(void) E:\code\emsdk\llvm\git\src\llvm\lib\MC\MCAssembler.cpp:942:0
#9 0x00007ff79080b4df llvm::AsmPrinter::doFinalization(class llvm::Module &) E:\code\emsdk\llvm\git\src\llvm\lib\CodeGen\AsmPrinter\AsmPrinter.cpp:1982:0
#10 0x00007ff7921957e2 llvm::FPPassManager::doFinalization(class llvm::Module &) E:\code\emsdk\llvm\git\src\llvm\lib\IR\LegacyPassManager.cpp:1498:0
#11 0x00007ff79219d201 `anonymous namespace'::MPPassManager::runOnModule E:\code\emsdk\llvm\git\src\llvm\lib\IR\LegacyPassManager.cpp:1585:0
#12 0x00007ff79219c780 llvm::legacy::PassManagerImpl::run(class llvm::Module &) E:\code\emsdk\llvm\git\src\llvm\lib\IR\LegacyPassManager.cpp:540:0
#13 0x00007ff790c5c09f ::operator bool C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\memory:2672:0
#14 0x00007ff790c5c09f codegen E:\code\emsdk\llvm\git\src\llvm\lib\LTO\LTOBackend.cpp:430:0
#15 0x00007ff790c5b90f llvm::lto::backend(struct llvm::lto::Config const &, class std::function<(unsigned int)>, unsigned int, class llvm::Module &, class llvm::ModuleSummaryIndex &) E:\code\emsdk\llvm\git\src\llvm\lib\LTO\LTOBackend.cpp:528:0
#16 0x00007ff790c50a60 ::operator bool E:\code\emsdk\llvm\git\src\llvm\include\llvm\Support\Error.h:235:0
#17 0x00007ff790c50a60 llvm::lto::LTO::runRegularLTO(class std::function<(unsigned int)>) E:\code\emsdk\llvm\git\src\llvm\lib\LTO\LTO.cpp:1139:0
#18 0x00007ff790c4ff12 ::operator bool E:\code\emsdk\llvm\git\src\llvm\include\llvm\Support\Error.h:235:0
#19 0x00007ff790c4ff12 llvm::lto::LTO::run(class std::function<(unsigned int)>, class std::function<(unsigned int, class llvm::StringRef)>) E:\code\emsdk\llvm\git\src\llvm\lib\LTO\LTO.cpp:1039:0
#20 0x00007ff790418f3a lld::wasm::BitcodeCompiler::compile(void) E:\code\emsdk\llvm\git\src\lld\wasm\LTO.cpp:138:0
#21 0x00007ff79042082e lld::wasm::SymbolTable::compileBitcodeFiles(void) E:\code\emsdk\llvm\git\src\lld\wasm\SymbolTable.cpp:77:0
#22 0x00007ff7903ef16c lld::wasm::`anonymous namespace'::LinkerDriver::linkerMain E:\code\emsdk\llvm\git\src\lld\wasm\Driver.cpp:985:0
#23 0x00007ff7903eddc8 ::{dtor} C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\include\vector:673:0
#24 0x00007ff7903eddc8 lld::wasm::link(class llvm::ArrayRef<char const *>, class llvm::raw_ostream &, class llvm::raw_ostream &, bool, bool) E:\code\emsdk\llvm\git\src\lld\wasm\Driver.cpp:98:0
#25 0x00007ff78ffeada8 lldMain E:\code\emsdk\llvm\git\src\lld\tools\lld\lld.cpp:164:0
#26 0x00007ff78ffeb4a1 main E:\code\emsdk\llvm\git\src\lld\tools\lld\lld.cpp:220:0
#27 0x00007ff79249d05c invoke_main d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78:0
#28 0x00007ff79249d05c __scrt_common_main_seh d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0
#29 0x00007fff86296fd4 (C:\WINDOWS\System32\KERNEL32.DLL+0x16fd4)
#30 0x00007fff86e9cec1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x4cec1)
```
I wonder if line 1868 is using the wrong error abort function?

That is, is the function trying to validate a property of the input file? If so, it is producing an error message to the user that asks the user to raise a bug report: ("PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.").
If the root issue is not a LLVM bug but a problem with user provided input file, then it seems that the error message should not be asking the user to raise a bug report?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs