[PATCH] D51170: [libc++] Remove race condition in std::async

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 23 09:21:40 PDT 2018


ldionne created this revision.
ldionne added a reviewer: mclow.lists.
Herald added a reviewer: EricWF.
Herald added subscribers: cfe-commits, dexonsmith, christof.

The state associated to the future was set in one thread (with synchronization)
but read in another thread without synchronization, which led to a data race.

https://bugs.llvm.org/show_bug.cgi?id=38682
rdar://problem/42548261


Repository:
  rCXX libc++

https://reviews.llvm.org/D51170

Files:
  libcxx/include/future
  libcxx/src/future.cpp
  libcxx/test/std/thread/futures/futures.async/async_race.38682.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51170.162200.patch
Type: text/x-patch
Size: 3876 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180823/9725103f/attachment.bin>


More information about the cfe-commits mailing list