Boost C++ Libraries: Ticket #3076: [multi_index] assertion failure sorting an empty collection in VC10 Beta 1 https://svn.boost.org/trac10/ticket/3076 <p> The Bimap 'test_bimap_sequenced' test is failing in VC10 beta due to an assertion failure (<a class="ext-link" href="http://tinyurl.com/qwczko"><span class="icon">​</span>http://tinyurl.com/qwczko</a>), but the actual problem seems to be in multi_index. </p> <p> When you run the sample: </p> <pre class="wiki">using namespace boost::multi_index; typedef multi_index_container&lt; std::string, indexed_by&lt; random_access&lt;&gt; &gt; &gt; text_container; int _tmain(int argc, _TCHAR* argv[]) { text_container tc; tc.sort(); return 0; } </pre><p> the call to std::copy on line 190 of rnd_index_ops.hpp passes NULL as the third parameter (&amp;*buf). The VC10 version of copy asserts if the 3rd param is NULL, causing the failure. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3076 Trac 1.4.3 Joaquín M López Muñoz Mon, 25 May 2009 12:20:15 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/3076#comment:1 https://svn.boost.org/trac10/ticket/3076#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">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/53246" title="fixed #3076">[53246]</a>) fixed <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3076" title="#3076: Bugs: [multi_index] assertion failure sorting an empty collection in VC10 Beta 1 (closed: fixed)">#3076</a> </p> Ticket Joaquín M López Muñoz Mon, 25 May 2009 13:00:39 GMT <link>https://svn.boost.org/trac10/ticket/3076#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3076#comment:2</guid> <description> <p> Hi Richard, </p> <p> Thanks for reporting this bug. I've just commited a fix: </p> <p> <a class="ext-link" href="https://svn.boost.org/trac/boost/changeset/53246"><span class="icon">​</span>https://svn.boost.org/trac/boost/changeset/53246</a> </p> <p> I'd appreciate if you can have keep an eye on this to make sure the problems in bimap eventually disappear. </p> <p> There's one thing in your description of the problem that puzzles me a bit: you say that std::copy asserts because the third parameter is NULL, yet it seems to me that it's entirely ok to invoke </p> <blockquote> <p> std::copy(first,last,NULL); </p> </blockquote> <p> as long as first==last and consequently NULL is not dereferenced. Can you provide me with more info on the kind of assertion failure you're seeing? Can't it rather be the expression &amp;*buf that is failing? </p> </description> <category>Ticket</category> </item> <item> <author>Richard Webb <richard.webb@…></author> <pubDate>Mon, 25 May 2009 18:26:42 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3076#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3076#comment:3</guid> <description> <p> In VC9, the copy code does the check </p> <blockquote> <p> _DEBUG_RANGE(_First, _Last); if (_First != _Last) </p> <blockquote> <p> _DEBUG_POINTER(_Dest); </p> </blockquote> </blockquote> <p> Wheras VC10 just does </p> <blockquote> <p> _DEBUG_RANGE(_First, _Last); _DEBUG_POINTER(_Dest); </p> </blockquote> <p> (Where _DEBUG_POINTER gives an error if _Dest is NULL). So VC9 only complains if Dest is null and theres something to do, but VC10 gives you an error any time it's null. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 26 May 2009 19:13:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3076#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3076#comment:4</guid> <description> <p> I see. I'm not entirely sure the VC10 checking is conformant, so I've posted a query to comp.std.c++: </p> <p> <a class="ext-link" href="http://tinyurl.com/ouut5e"><span class="icon">​</span>http://tinyurl.com/ouut5e</a> </p> <p> Let's see what the gurus say. </p> </description> <category>Ticket</category> </item> </channel> </rss>