[Boost-bugs] [Boost C++ Libraries] #11611: boost::executors::serial_executor_cont stack overflow during destruction

Subject: [Boost-bugs] [Boost C++ Libraries] #11611: boost::executors::serial_executor_cont stack overflow during destruction
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-09-02 12:56:32


#11611: boost::executors::serial_executor_cont stack overflow during destruction
--------------------------------------+----------------------
 Reporter: asafa3@… | Owner: anthonyw
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: thread
  Version: Boost 1.58.0 | Severity: Problem
 Keywords: stack overflow executors |
--------------------------------------+----------------------
 I'm getting stack overflow in destructor of serial_executor_cont under
 Visual Studio 2015 RTM.

 {{{
 #include <iostream>
 #include <thread>

 #define BOOST_THREAD_PROVIDES_FUTURE
 #define BOOST_THREAD_PROVIDES_EXECUTORS
 #define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
 #include <boost/thread/executors/loop_executor.hpp>
 #include <boost/thread/executors/serial_executor_cont.hpp>

 using namespace std;

 int main()
 {
    boost::loop_executor ex;

    thread t([&ex]()
    {
       ex.loop();
    });

    {
       boost::serial_executor_cont serial(ex);

       for (size_t i = 0; i < 100000; i++)
          serial.submit([] {});

       serial.close();
    }

    ex.close();

    t.join();
    cout << "end" << endl;
 }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11611>
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