[Boost-bugs] [Boost C++ Libraries] #11250: future made from make_exceptional fails on assertion in destructor

Subject: [Boost-bugs] [Boost C++ Libraries] #11250: future made from make_exceptional fails on assertion in destructor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-04-29 13:19:03


#11250: future made from make_exceptional fails on assertion in destructor
-------------------------------------------+----------------------
 Reporter: Konrad Zemek <konrad.zemek@…> | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.58.0 | Severity: Problem
 Keywords: make_exceptional assert |
-------------------------------------------+----------------------
 A future created from make_exceptional fails an assertion during
 destruction:
 {{{
 ../include/boost/thread/future.hpp:155: virtual
 boost::detail::shared_state_base::~shared_state_base(): Assertion
 `cnt_==0' failed.
 }}}

 The error can be reproduced by calling {{{compute(-1)}}} in
 examples/make_future.cpp

 Trace:
 {{{
 #0 0x0000003b1f6348d7 in __GI_raise (sig=sig_at_entry=6) at
 ../sysdeps/unix/sysv/linux/raise.c:55
 #1 0x0000003b1f63653a in __GI_abort () at abort.c:89
 #2 0x0000003b1f62d47d in __assert_fail_base (fmt=0x3b1f786cb8 "%s%s%s:%u:
 %s%sAssertion `%s' failed.\n%n",
     assertion=assertion_at_entry=0x42a333 "cnt_==0", file=file_at_entry=0x42a310
 "../include/boost/thread/future.hpp",
     line=line_at_entry=155,
     function=function_at_entry=0x42a8a0
 <boost::detail::shared_state_base::~shared_state_base()::__PRETTY_FUNCTION__>
 "virtual boost::detail::shared_state_base::~shared_state_base()") at
 assert.c:92
 #3 0x0000003b1f62d532 in __GI___assert_fail (assertion=0x42a333
 "cnt_==0",
     file=0x42a310 "../include/boost/thread/future.hpp", line=155,
     function=0x42a8a0
 <boost::detail::shared_state_base::~shared_state_base()::__PRETTY_FUNCTION__>
 "virtual boost::detail::shared_state_base::~shared_state_base()") at
 assert.c:101
 #4 0x000000000040ddb5 in
 boost::detail::shared_state_base::~shared_state_base (this=0x648200,
     __in_chrg=<optimized out>) at ../include/boost/thread/future.hpp:155
 #5 0x0000000000422e0d in boost::detail::shared_state<int>::~shared_state
 (this=0x648200, __in_chrg=<optimized out>)
     at ../include/boost/thread/future.hpp:488
 #6 0x0000000000422e3c in boost::detail::shared_state<int>::~shared_state
 (this=0x648200, __in_chrg=<optimized out>)
     at ../include/boost/thread/future.hpp:488
 #7 0x0000000000423b0b in
 boost::checked_delete<boost::detail::shared_state<int> > (x=0x648200)
     at /usr/local/include/boost/core/checked_delete.hpp:34
 #8 0x000000000042655e in
 boost::detail::sp_counted_impl_p<boost::detail::shared_state<int>
>::dispose (
     this=0x6481c0) at
 /usr/local/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78
 #9 0x000000000040ac4a in boost::detail::sp_counted_base::release
 (this=0x6481c0)
     at
 /usr/local/include/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp:146
 #10 0x000000000040ad0d in boost::detail::shared_count::~shared_count
 (this=0x7fffffffd8e8,
     __in_chrg=<optimized out>) at
 /usr/local/include/boost/smart_ptr/detail/shared_count.hpp:443
 #11 0x0000000000418c7a in
 boost::shared_ptr<boost::detail::shared_state<int> >::~shared_ptr
 (this=0x7fffffffd8e0,
     __in_chrg=<optimized out>) at
 /usr/local/include/boost/smart_ptr/shared_ptr.hpp:323
 #12 0x0000000000418ff2 in boost::detail::basic_future<int>::~basic_future
 (this=0x7fffffffd8e0,
     __in_chrg=<optimized out>) at ../include/boost/thread/future.hpp:1189
 #13 0x0000000000412882 in boost::future<int>::~future
 (this=0x7fffffffd8e0, __in_chrg=<optimized out>)
     at ../include/boost/thread/future.hpp:1541
 #14 0x000000000040a3db in main () at make_future.cpp:100
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11250>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC