Boost C++ Libraries: Ticket #7967: auto_index crashes during boostbook xml processing https://svn.boost.org/trac10/ticket/7967 <p> auto_index crashes with following backtrace: </p> <p> <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3" title="#3: Bugs: automatic conversion and overload proble (closed: fixed)">#3</a> 0x08126947 in std::pair&lt;std::string, std::string&gt;::pair (this=0xbf909bb8, <span class="underline">a=&lt;error reading variable: Cannot access memory at address 0x0&gt;, </span>b="end") </p> <blockquote> <p> at /usr/include/c++/4.7/bits/stl_pair.h:105 </p> </blockquote> <p> <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/4" title="#4: Bugs: any_ptr in any library documentation? (closed: Fixed)">#4</a> 0x0811ef7c in process_node (node=..., prev=0xbf909ea4, pt=0xbf909e9c, seen=false) </p> <blockquote> <p> at /usr/src/projects/boost/modularize/src/boost/auto_index/src/auto_index.cpp:469 </p> </blockquote> <p> I founded, that this error happens when we construct item_index: </p> <pre class="wiki">std::pair&lt;std::string, std::string&gt; item_index(*pid, i-&gt;term); </pre><p> with incorrect pid argument (in this case it equals to zero). This variable is initialized at line 455: </p> <pre class="wiki">const std::string* pid = get_current_block_id(&amp;id); </pre><p> And this function returns 0, which causes segfault </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7967 Trac 1.4.3 alexey kutumov <alexey.kutumov@…> Sun, 03 Feb 2013 06:14:17 GMT attachment set https://svn.boost.org/trac10/ticket/7967 https://svn.boost.org/trac10/ticket/7967 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">autoindex_issue.zip</span> </li> </ul> <p> reproducing example </p> Ticket John Maddock Wed, 13 Feb 2013 18:52:28 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7967#comment:1 https://svn.boost.org/trac10/ticket/7967#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">invalid</span> </li> </ul> <p> You can't run auto_index on boostbook, only on docbook. </p> Ticket Steven Watanabe Tue, 05 Mar 2013 16:40:45 GMT status changed; resolution deleted https://svn.boost.org/trac10/ticket/7967#comment:2 https://svn.boost.org/trac10/ticket/7967#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">invalid</span> </li> </ul> <p> Even if it's illegal, auto_index shouldn't crash on invalid input. </p> Ticket John Maddock Thu, 18 Apr 2013 12:26:26 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7967#comment:3 https://svn.boost.org/trac10/ticket/7967#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</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/83952" title="Throw exception on precondition failure. Fixes #7967.">[83952]</a>) Throw exception on precondition failure. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7967" title="#7967: Bugs: auto_index crashes during boostbook xml processing (closed: fixed)">#7967</a>. </p> Ticket