[LLVMbugs] [Bug 18611] New: Thread sanitizer reports race condition with std::async

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Jan 25 00:53:34 PST 2014


            Bug ID: 18611
           Summary: Thread sanitizer reports race condition with
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: michi.henning at canonical.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11936
  --> http://llvm.org/bugs/attachment.cgi?id=11936&action=edit
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(); });

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

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140125/84c0c2cd/attachment.html>

More information about the llvm-bugs mailing list