#11351 closed Bugs (worksforme)
boost::asio::ip::tcp::acceptor::open crash under win x64 with Boost.Context/Coroutine
Reported by: | 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).
Below 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 (5)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Add:
My vc2013 is no update, under update4, boost.asio's cpp11 spawn example will be ok.
comment:3 by , 7 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
on Win8/x64 it works for me (<link>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.
follow-up: 5 comment:4 by , 7 years ago
Will this version (using WIN fibers) update under new version Boost(May be 1.59? 1.60?)
comment:5 by , 7 years ago
Replying to 348944179@…:
Will this version (using WIN fibers) update under new version Boost(May be 1.59? 1.60?)
hopefully yes - I'll try my best
P.S. Under win32 x86 and linux(amd64 and 32) everything is ok.