Boost::asio bug in MSVC10 - Failing BOOST_WORKAROUND in ~buffer_debug_check() in buffer.hpp

Posted by shaz on Stack Overflow See other posts from Stack Overflow or by shaz
Published on 2010-05-20T22:57:42Z Indexed on 2010/05/20 23:00 UTC
Read the original article Hit count: 203

Filed under:
|
|
|

A straight compilation of example http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/tutorial/tutdaytime3/src.html results in a runtime null pointer exception. Stack trace points to the buffer_debug_check destructor which contains this comment:

// MSVC's string iterator checking may crash in a std::string::iterator // object's destructor when the iterator points to an already-destroyed // std::string object, unless the iterator is cleared first.

The test #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) succeeds in MSVC10 and (but) results in a null pointer exception in c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xutility line 123

_Iterator_base12& operator=(const _Iterator_base12& _Right) { // assign an iterator if (_Myproxy != _Right._Myproxy) _Adopt(_Right._Myproxy->_Mycont); return (*this); }

_Right._Myproxy is NULL

© Stack Overflow or respective owner

Related posts about boost

Related posts about msvc