Boost C++ Libraries: Ticket #5759: Enabling -std=c++0x causes random crashes in ASIO since Boost 1.47.0 https://svn.boost.org/trac10/ticket/5759 <p> Hello, </p> <p> to start off, I know that this bug report sucks. But I haven't been able to make a simple test case that would exhibit the bug and wouldn't require you to have other libs installed, so this will have to suffice. </p> <p> I'm working on a project that uses both Rasterbar libtorrent and Pion Network libraries. They both use Boost ASIO. The problem is that if the following conditions are met, the resulting binary starts crashing randomly inside of the ASIO code: </p> <ol><li>Boost 1.47.0 is used (previous versions work fine!) </li><li><code>-std=c++0x</code> is used </li><li>Pion Network header files are included in any of the compiled source files (just including suffices!) </li></ol><p> Please, install Rasterbar libtorrent and Pion Network and try compiling the attached file. First without <code>-std=c++0x</code> and then with <code>-std=c++0x</code>. The latter will make the binary crash. </p> <p> I suppose this is caused by the newly introduced move constructors. But I'm not sure whether this is an ASIO or a GCC bug. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/5759 Trac 1.4.3 lubos@… Sat, 06 Aug 2011 16:13:13 GMT attachment set https://svn.boost.org/trac10/ticket/5759 https://svn.boost.org/trac10/ticket/5759 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test.cpp</span> </li> </ul> <p> Example program </p> Ticket chris_kohlhoff Sat, 06 Aug 2011 23:49:39 GMT status, severity changed; resolution set https://svn.boost.org/trac10/ticket/5759#comment:1 https://svn.boost.org/trac10/ticket/5759#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">worksforme</span> </li> <li><strong>severity</strong> <span class="trac-field-old">Regression</span> → <span class="trac-field-new">Problem</span> </li> </ul> <p> I suspect from your description that one or more of the components (e.g. libpion) has not been compiled with the -std=c++0x compiler option. You need to make sure everything is compiled with -std=c++0x. If you do so, it works. </p> Ticket