Le 26/09/13 17:46, Daniel James a écrit :
On 26 September 2013 15:49, Vicente J. Botet Escriba
wrote: Could I merge this fix once the regression test have cycled
Committed revision 85962. Thread: future::then should join the thread before destruction. https://svn.boost.org/trac/boost/changeset/85962 Is this a bug fix, or a standards compliance fix? If the former than yes, such fixes are fine. If the latter then I'm inclined to say yes, but another release manager might be more knowledgeable than me, or have another opinion? It is a bug fix.
Actually, I just had a look at the patch, and I don't think I understand it. Calling 'join' in the destructor for 'future_async_continuation_shared_state' seems redundant since it inherits from 'future_async_shared_state_base' and its destructor calls 'join'. Am I missing something?
Yes, here is the problem the data associated to the future_async_continuation_shared_state will be destroyed before the future_async_shared_state_base would try to join. As the thread function associated to the continuation uses these variables there is undefined behavior (a big bug :( ). Currently the regression test on clang- darwin- asan11 are failing on some the future::then tests. I hope that this change would fix them. We can anyway wait until this tester runs tomorrow. Best, Vicente