Opened 7 years ago

Closed 7 years ago

#11349 closed Bugs (duplicate)

boost::asio::ip::tcp::acceptor::open crash under win x64 with Boost.Context/Coroutine

Reported by: 348944179@… Owned by: olli
Milestone: To Be Determined Component: context
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

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.

Change History (1)

comment:1 by olli, 7 years ago

Resolution: duplicate
Status: newclosed

duplicate : 11351

Note: See TracTickets for help on using tickets.