http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54297

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-17 
15:32:29 UTC ---
I suspect the problem is that when _Async_state_common calls _M_thread.join()
to wait for the async task, the derived destructor of _Async_state_impl has
already run and has destroyed the shared state.

If that's correct, the fix would be to add:

      ~_Async_state_impl() { _M_join(); }

Reply via email to