[PATCH] Workaround ASAN race condition in future tests by manually joining threads.

Eric Fiselier eric at efcs.ca
Thu Nov 20 15:48:43 PST 2014


Hi mclow.lists, danalbert, jroelofs,

There is a race condition in ASAN where it can perform the leak detection before all detached threads exit and free their resources. This can lead to failures in the future tests. 
This patch fixes the race condition my manually joining all threads that are used. This patch should not affect the functionality of the tests.

http://reviews.llvm.org/D6347

Files:
  test/thread/futures/futures.shared_future/get.pass.cpp
  test/thread/futures/futures.shared_future/wait.pass.cpp
  test/thread/futures/futures.shared_future/wait_for.pass.cpp
  test/thread/futures/futures.shared_future/wait_until.pass.cpp
  test/thread/futures/futures.tas/futures.task.members/dtor.pass.cpp
  test/thread/futures/futures.tas/futures.task.members/make_ready_at_thread_exit.pass.cpp
  test/thread/futures/futures.tas/futures.task.members/operator.pass.cpp
  test/thread/futures/futures.unique_future/get.pass.cpp
  test/thread/futures/futures.unique_future/wait.pass.cpp
  test/thread/futures/futures.unique_future/wait_for.pass.cpp
  test/thread/futures/futures.unique_future/wait_until.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6347.16460.patch
Type: text/x-patch
Size: 18816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141120/dcb28fad/attachment.bin>


More information about the cfe-commits mailing list