<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - Thread sanitizer reports race condition with std::async"
href="http://llvm.org/bugs/show_bug.cgi?id=18611">18611</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Thread sanitizer reports race condition with std::async
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++11
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>michi.henning@canonical.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=11936" name="attach_11936" title="Thread sanitizer output">attachment 11936</a> <a href="attachment.cgi?id=11936&action=edit" title="Thread sanitizer output">[details]</a></span>
Thread sanitizer output
I wasn't sure which category to best select for this, so I'm reporting this for
clang/c++11. Please let me know if that's the wrong classification.
Thread sanitizer reports a race condition for the following program:
#include <future>
void run() {}
int main()
{
auto f = std::async(std::launch::async, [] { run(); });
f.get();
}
It's not clear to me whether this is a genuine race or a problem with thread
sanitizer. I've attached the sanitizer output.
Program was compiled with
clang++ -g --std=c++11 -fsanitize=thread x.cpp
Version info:
Ubuntu clang version 3.3-16ubuntu1 (branches/release_33) (based on LLVM 3.3)
Target: x86_64-pc-linux-gnu
Thread model: posix</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>