<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 - Deadlock inside llvm::parallel::TaskList::spawn stops LLD compiled with MinGW-w64"
href="https://bugs.llvm.org/show_bug.cgi?id=34864">34864</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Deadlock inside llvm::parallel::TaskList::spawn stops LLD compiled with MinGW-w64
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</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>Support Libraries
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>vasek.gello@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I managed to build the latest trunk with MinGW-w64 GCC 7.1.0 (posix-seh) and it
works fine producing cross-platform code.
During the tests I noticed that linking an ELF target on Windows host platform
with LLD results in a deadlock in llvm::parallel::TaskList::spawn (basically,
here: <a href="https://llvm.org/doxygen/Parallel_8cpp_source.html#l0098">https://llvm.org/doxygen/Parallel_8cpp_source.html#l0098</a> ). The correct
ELF file is produced only if -Wlm--no-threads switch is added to clang command
line.
I tried to change the add() function like described here:
<a href="https://stackoverflow.com/questions/15912322/condition-variable-deadlock">https://stackoverflow.com/questions/15912322/condition-variable-deadlock</a> but
the deadlock moved into ~Latch destructor.</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>