This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/54297] [C++11] Segmentation fault with std::async and released shared state
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 25 Aug 2012 23:06:11 +0000
- Subject: [Bug libstdc++/54297] [C++11] Segmentation fault with std::async and released shared state
- Auto-submitted: auto-generated
- References: <bug-54297-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54297
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-25 23:06:11 UTC ---
Author: redi
Date: Sat Aug 25 23:06:07 2012
New Revision: 190673
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190673
Log:
PR libstdc++/54297
* include/std/future (~_Async_state_impl): Join thread before
derived class members are destroyed.
(~_Async_state_common): Only define non-trivial destructor when
included from future.cc for ABI compatibility reasons.
* src/c++11/future.cc (_GLIBCXX_ABI_COMPAT_ASYNC): Define.
* testsuite/30_threads/async/54297.cc: New.
Added:
branches/gcc-4_7-branch/libstdc++-v3/testsuite/30_threads/async/54297.cc
Modified:
branches/gcc-4_7-branch/libstdc++-v3/ChangeLog
branches/gcc-4_7-branch/libstdc++-v3/include/std/future
branches/gcc-4_7-branch/libstdc++-v3/src/c++11/future.cc