<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 - Crash when linking two bitcode modules with gvar/alias definitions"
href="https://bugs.llvm.org/show_bug.cgi?id=51482">51482</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash when linking two bitcode modules with gvar/alias definitions
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>12.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Windows NT
</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>Linker
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>itay.bookstein@nextsilicon.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>// a.ll
@g_bar = external dso_local local_unnamed_addr constant i32, align 4
@g_foo = alias i32, i32* @g_bar
// b.ll
@g_foo = external dso_local local_unnamed_addr constant i32, align 4
@g_bar = dso_local constant i32 1, align 4
Invoke llvm-link-12 a.ll b.ll -S -o c.ll
Stack dump:
0. Program arguments: llvm-link-12 bla1.ll bla2.ll -S -o bla3.ll
#0 0x00007f70c7e8c3d3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xcfc3d3)
#1 0x00007f70c7e8a700 llvm::sys::RunSignalHandlers()
(/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xcfa700)
#2 0x00007f70c7e8ca3f (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0xcfca3f)
#3 0x00007f70c7181730 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12730)
#4 0x00007f70c8df487a (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x1c6487a)
#5 0x00007f70c88a9119 (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x1719119)
#6 0x00007f70c88a8b08 (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x1718b08)
#7 0x00007f70c88a908f llvm::ValueMapper::mapValue(llvm::Value const&)
(/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x171908f)
#8 0x00007f70c8df1f42 (/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x1c61f42)
#9 0x00007f70c8df068b llvm::IRMover::move(std::unique_ptr<llvm::Module,
std::default_delete<llvm::Module> >, llvm::ArrayRef<llvm::GlobalValue*>,
std::function<void (llvm::GlobalValue&, std::function<void
(llvm::GlobalValue&)>)>, bool)
(/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x1c6068b)
#10 0x00007f70c8dfa311 llvm::Linker::linkInModule(std::unique_ptr<llvm::Module,
std::default_delete<llvm::Module> >, unsigned int, std::function<void
(llvm::Module&, llvm::StringSet<llvm::MallocAllocator> const&)>)
(/lib/x86_64-linux-gnu/libLLVM-12.so.1+0x1c6a311)
#11 0x00000000004083f0 llvm::errorCodeToError(std::error_code)
(/usr/lib/llvm-12/bin/llvm-link+0x4083f0)
#12 0x0000000000405d8c llvm::errorCodeToError(std::error_code)
(/usr/lib/llvm-12/bin/llvm-link+0x405d8c)
#13 0x00007f70c6cb109b __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2409b)
#14 0x000000000040575a llvm::errorCodeToError(std::error_code)
(/usr/lib/llvm-12/bin/llvm-link+0x40575a)
fish: “llvm-link-12 bla1.ll bla2.ll -S…” terminated by signal SIGSEGV (Address
boundary error)</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>