Re: [Boost-bugs] [Boost C++ Libraries] #704: format zero length string msvc-8

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #704: format zero length string msvc-8
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-08-18 14:34:54


#704: format zero length string msvc-8
---------------------------+------------------------------------------------
  Reporter: drjohnfoster | Owner: samuel_krempp
      Type: Bugs | Status: assigned
 Milestone: | Component: format
   Version: None | Severity: Problem
Resolution: None | Keywords:
---------------------------+------------------------------------------------
Changes (by grafik):

  * component: None => format

Old description:

> {{{
> Since Microsoft have deprecated most of the standard
> library, their debug libraries also check for unsafe
> pointers. The following code gives an assertion:
>
> (boost::format("%s") % "").str();
>
> In debug mode, basic_string<char>::append(0, 0)
> called from mk_str in feed_args.hpp is tested by the
> macro _DEBUG_POINTER, and decides the pointer is
> invalid even though the count is 0.
>
> I imagine this toxic behaviour is repeated in a
> number of places. It would be nice if the boost
> library could work around this problem at a low level.
> }}}

New description:

 {{{
 Since Microsoft have deprecated most of the standard
 library, their debug libraries also check for unsafe
 pointers. The following code gives an assertion:

 (boost::format("%s") % "").str();

 In debug mode, basic_string<char>::append(0, 0)
 called from mk_str in feed_args.hpp is tested by the
 macro _DEBUG_POINTER, and decides the pointer is
 invalid even though the count is 0.

 I imagine this toxic behaviour is repeated in a
 number of places. It would be nice if the boost
 library could work around this problem at a low level.
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/704#comment:5>
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:49:56 UTC