Opened 7 years ago

Closed 7 years ago

#11610 closed Bugs (duplicate)

boost::executors::serial_executor_cont stack overflow during destruction

Reported by: asafa3@… Owned by: Anthony Williams
Milestone: To Be Determined Component: thread
Version: Boost 1.58.0 Severity: Problem
Keywords: stack overflow executors Cc:

Description

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;
}

Change History (1)

comment:1 by viboes, 7 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.