<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/87341>87341</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm-link return a file, when lli execute the file, it crash
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
xinchen-jzx
</td>
</tr>
</table>
<pre>
I am constructing compiler, when i test my compiler and llvm compiler, we find that: llvm-link return a file, when lli execute the file, it crash
the error information is below:
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: lli ./gen.ll
#0 0x00007f0fbb449d01 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe3fd01)
#1 0x00007f0fbb447a3e llvm::sys::RunSignalHandlers() (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe3da3e)
#2 0x00007f0fbb44a236 (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0xe40236)
#3 0x00007f0fba0f0520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007f0fc0f268bc
#5 0x00007f0fbce9184d llvm::orc::runAsMain(int (*)(int, char**), llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, llvm::Optional<llvm::StringRef>) (/lib/x86_64-linux-gnu/libLLVM-14.so.1+0x288784d)
#6 0x0000000000418110 runOrcJIT(char const*) (/usr/lib/llvm-14/bin/lli+0x418110)
#7 0x0000000000412cc8 main (/usr/lib/llvm-14/bin/lli+0x412cc8)
#8 0x00007f0fba0d7d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#9 0x00007f0fba0d7e40 call_init ./csu/../csu/libc-start.c:128:20
#10 0x00007f0fba0d7e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#11 0x000000000040fe15 _start (/usr/lib/llvm-14/bin/lli+0x40fe15)
[2] 45785 segmentation fault (core dumped) lli ./gen.ll
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVk1v2zgQ_TX0ZWCBH_qgDj64boztokWDptirQVGUzIaiDJLaOPvrF6QMOzJy2GYFBJE4w_fePE6GEd7r3iq1QcUnVHxeiSkcR7c5ayuPyq5__XNeNWP7uvkCYgA5Wh_cJIO2PchxOGmjHKI7eDkqCxqC8gGG12sIhG3BmL-HZbKCTtsWwlEExLYpYW20fQanwuQsCOi0UVdcYzSos5JTUBCO6hrUAaQT_ojwZ4S3MaKcGx1o241uEEGPFrSHRpnxBbHtnPb49WH79AB-agYdQEAz9eDUaXQBwgjHEE4-5tI9ovteh-PUZHIcEN1HlZdf65MbfykZEN1r7yflEd2nUrWVZmpnlUkaNEI-Byekymb6pyDkM7TTcLoqwhmk59GNvRMDCNdPg7LBz95oyKIUZTNj5g2AKMOAzxhjXHW4a5o8r1tMkpERlm39q59fHp22IZH-jCoQ5bckJ14Oow9OiQHRMjlqA6I1IMpjpbpBdH_m5aHM4_FM53Vvpznw9etf39Ykz_yYEUQ_4bNiXYsJovVNIrmTWAmm3pP4Y7JPurfC_CFsa5Tzif6DKlrB1EIFvVMhKCs_BJ1jysoFNHsLLXCHC4r_A7SMoGUCzWlB8QIzf4MpcUdL3ki4hYu3lFLVhOftG09HJy9HO9mt_ya0RZRrG2ZV28iUvuNZy6NwaW1e3r2B2TonXn-oDrGdD-28djjI85mQ-aMRXsuDD07bHrHdDLWDa3JcOAQndGziOcweFhnCmFGKMLpbHC4_Sy3fT_HvWBjEdrfFp8ScFD58sFUo5xXP24X55cXd-ckJJwSDm-x3J__88hNRHpXOQ3C27UI8eXelT_OB5Ijum-j-3hg9H3VCW9BVd3RUSg6D0Pa3YOOuBSxftmVbtTWGwyF23sEH4cJBCmMOiSiOFumjR1l89a--Vac4zuwpmEu73m_KjohtC47YlpQ31vqeVeUY0h5tdbgnml8j-jqhZ7F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