Boost C++ Libraries: Ticket #704: format zero length string msvc-8 https://svn.boost.org/trac10/ticket/704 <pre class="wiki">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&lt;char&gt;::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. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/704 Trac 1.4.3 nobody Tue, 13 Feb 2007 12:06:11 GMT <link>https://svn.boost.org/trac10/ticket/704#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/704#comment:1</guid> <description> <pre class="wiki">Logged In: NO According to the C++ standard, basic_string&lt;char&gt;::append(0, 0) returns basic_string&lt;char&gt;::append(basic_string&lt;char&gt;(0,0)) The standard specifically says the pointer shall not be a null. So I believe that this was a bug in the boost format library, rather than a problem with the MSVC library. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>magic_op</dc:creator> <pubDate>Fri, 02 Mar 2007 01:16:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/704#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/704#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=1562825 Originator: NO This will also happen with an empty string (instead of just a character array/pointer) std::string my_string; (boost::format("%1%") % my_string).str(); </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Samuel Krempp</dc:creator> <pubDate>Thu, 16 Aug 2007 19:39:27 GMT</pubDate> <title>owner, status changed; severity set https://svn.boost.org/trac10/ticket/704#comment:3 https://svn.boost.org/trac10/ticket/704#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">samuel_k</span> to <span class="trac-author">Samuel Krempp</span> </li> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">new</span> </li> <li><strong>severity</strong> → <span class="trac-field-new">Problem</span> </li> </ul> Ticket Samuel Krempp Thu, 16 Aug 2007 20:37:21 GMT status changed https://svn.boost.org/trac10/ticket/704#comment:4 https://svn.boost.org/trac10/ticket/704#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket René Rivera Sat, 18 Aug 2007 14:34:54 GMT component, description changed https://svn.boost.org/trac10/ticket/704#comment:5 https://svn.boost.org/trac10/ticket/704#comment:5 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">format</span> </li> <li><strong>description</strong> modified (<a href="/trac10/ticket/704?action=diff&amp;version=5">diff</a>) </li> </ul> Ticket John Maddock Tue, 20 Nov 2007 11:43:04 GMT status, resolution changed; milestone set https://svn.boost.org/trac10/ticket/704#comment:6 https://svn.boost.org/trac10/ticket/704#comment:6 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> → <span class="trac-field-new">Boost 1.35.0</span> </li> </ul> <p> This appear to be fixed (and tested for) in SVN Trunk. So I'm closing the issue down: please reopen if it resurfaces. </p> Ticket Alvaro Sat, 18 Apr 2009 04:56:35 GMT <link>https://svn.boost.org/trac10/ticket/704#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/704#comment:7</guid> <description> <p> Death was Nature's way of telling you to slow down. </p> <blockquote> <p> -- (Terry Pratchett, Strata) </p> </blockquote> <p> <a class="ext-link" href="http://compraviagraitalia.com/notizie/index.php"><span class="icon">​</span>viagra prezzo</a> <a class="ext-link" href="http://headachetreatment.net/fioricet_faq.html"><span class="icon">​</span>fioricet canada</a> <a class="ext-link" href="http://compraviagraitalia.com/it/item/generic_viagra_st.html"><span class="icon">​</span>come comprare cialis generico</a> <a class="ext-link" href="http://www.relievepain.org/"><span class="icon">​</span>prices tramadol</a> </p> </description> <category>Ticket</category> </item> </channel> </rss>