Boost C++ Libraries: Ticket #11350: boost::asio::ip::tcp::acceptor::open crash under win x64 with Boost.Context/Coroutine https://svn.boost.org/trac10/ticket/11350 <p> using boost::asio::ip::tcp; ... </p> <p> boost::asio::io_service ios; boost::asio::spawn(ios, [](boost::asio::yield_context yield){ </p> <blockquote> <p> ... 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; </p> </blockquote> <blockquote> <p> acpr.open(ep.protocol()); <em> this will crash!! ... </em></p> </blockquote> <blockquote> <p> }); </p> </blockquote> <p> If above code not running in a coroutine, but a thread(like main thread), acpr.open(ep.protocol()); will be ok. </p> <p> I tested vc9(vs2008) and vc12(vs2013) x64 under Win7 and Win8.1, all the same(include boost 1.57 and 1.58). </p> <p> Attach code come from Boost.Asio example (cpp11) spawn: <a href="http://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/example/cpp11/spawn/echo_server.cpp">http://www.boost.org/doc/libs/1_58_0/doc/html/boost_asio/example/cpp11/spawn/echo_server.cpp</a> </p> <p> Run this example code, same error will raise. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11350 Trac 1.4.3 olli Thu, 28 May 2015 17:51:39 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11350#comment:1 https://svn.boost.org/trac10/ticket/11350#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> duplicate : 11351 </p> Ticket