Boost C++ Libraries: Ticket #11351: boost::asio::ip::tcp::acceptor::open crash under win x64 with Boost.Context/Coroutine https://svn.boost.org/trac10/ticket/11351 <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> Below 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/11351 Trac 1.4.3 348944179@… Wed, 27 May 2015 06:55:19 GMT <link>https://svn.boost.org/trac10/ticket/11351#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11351#comment:1</guid> <description> <p> P.S. Under win32 x86 and linux(amd64 and 32) everything is ok. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 27 May 2015 07:45:51 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11351#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11351#comment:2</guid> <description> <p> Add: </p> <p> My vc2013 is no update, under update4, boost.asio's cpp11 spawn example will be ok. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Fri, 29 May 2015 18:41:08 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/11351#comment:3 https://svn.boost.org/trac10/ticket/11351#comment:3 <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">worksforme</span> </li> </ul> <p> on Win8/x64 it works for me (&lt;link&gt;shared/static) - probably it's an issue of the TIB which is not fully documented by Microsoft. A MS Pricipal told to me that some required parts of TIB are not swapped by boost.context - but he did want to tell me which one. I'll provide a version of boost.context using WIN fibers internally - then it should work. </p> Ticket 348944179@… Sat, 30 May 2015 02:40:22 GMT <link>https://svn.boost.org/trac10/ticket/11351#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11351#comment:4</guid> <description> <p> Will this version (using WIN fibers) update under new version Boost(May be 1.59? 1.60?) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>olli</dc:creator> <pubDate>Sat, 30 May 2015 15:04:07 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/11351#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/11351#comment:5</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/11351#comment:4" title="Comment 4">348944179@…</a>: </p> <blockquote class="citation"> <p> Will this version (using WIN fibers) update under new version Boost(May be 1.59? 1.60?) </p> </blockquote> <p> hopefully yes - I'll try my best </p> </description> <category>Ticket</category> </item> </channel> </rss>