[Boost-bugs] [Boost C++ Libraries] #11350: boost::asio::ip::tcp::acceptor::open crash under win x64 with Boost.Context/Coroutine

Subject: [Boost-bugs] [Boost C++ Libraries] #11350: boost::asio::ip::tcp::acceptor::open crash under win x64 with Boost.Context/Coroutine
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-27 06:50:13


#11350: boost::asio::ip::tcp::acceptor::open crash under win x64 with
Boost.Context/Coroutine
------------------------------+---------------------
 Reporter: 348944179@… | Owner: olli
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: context
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 using boost::asio::ip::tcp;
 ...

 boost::asio::io_service ios;
 boost::asio::spawn(ios, [](boost::asio::yield_context yield){
     ...
     tcp::acceptor acpr(ios);
     tcp::resolver rsv(ios);
     tcp::resolver::query qry("0.0.0.0", "23333");
     tcp::resolver::iterator itr = rsv.resolve(qry);
     tcp::endpoint ep = *itr;

     acpr.open(ep.protocol()); // this will crash!!
     ...
   });

 If above code not running in a coroutine, but a thread(like main thread),
 acpr.open(ep.protocol()); will be ok.

 I tested vc9(vs2008) and vc12(vs2013) x64 under Win7 and Win8.1, all the
 same(include boost 1.57 and 1.58).

 Attach code come from Boost.Asio example (cpp11) spawn:
 http://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/example/cpp11/spawn/echo_server.cpp

 Run this example code, same error will raise.

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