Opened 7 years ago

Closed 7 years ago

#11611 closed Support Requests (invalid)

boost::executors::serial_executor_cont stack overflow during destruction

Reported by: asafa3@… Owned by: viboes
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 (4)

comment:1 by viboes, 7 years ago

Owner: changed from Anthony Williams to viboes
Status: newassigned

comment:2 by viboes, 7 years ago

serial_executor_cont class is not supported. Please, could you try serial_executor?

comment:3 by viboes, 7 years ago

Type: BugsSupport Requests

serial_executor_cont implementation has this stack drawback as it uses continuations. When one one of the task is executed the next task in executed on the continuation which will make the future to be ready starting again the continuation ...

comment:4 by viboes, 7 years ago

Resolution: invalid
Status: assignedclosed
Note: See TracTickets for help on using tickets.