Subject: [Boost-bugs] [Boost C++ Libraries] #7162: socket streams crash with C++11 enabled; tie(this) no longer legal
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-23 16:46:15
#7162: socket streams crash with C++11 enabled; tie(this) no longer legal
---------------------------------------+------------------------------------
Reporter: andrew.c.morrow@⦠| Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
Version: Boost Development Trunk | Severity: Problem
Keywords: |
---------------------------------------+------------------------------------
The boost::asio sockets streams classes derive from std::basic_iostream,
and then call {{{tie(this)}}}] in the basic_socket_iostream constructor.
In C++11 this is no longer legal (I tried providing a link here, but trac
wouldn't let me). The issue is explained here: {{{cplusplus.github.com/LWG
/lwg-defects.html#835}}}
Some standard libraries (like libc++) already implement this behavior, and
so attempts to use the ASIO socket streams classes cause infinite
recursion leading to eventual stack exhaustion and a crash.
I found this issue in boost 1.50.0, but it appears on the boost trunk svn
as well so I have filled the ticket against trunk.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7162> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC