[Boost-bugs] [Boost C++ Libraries] #7967: auto_index crashes during boostbook xml processing

Subject: [Boost-bugs] [Boost C++ Libraries] #7967: auto_index crashes during boostbook xml processing
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-03 06:13:32


#7967: auto_index crashes during boostbook xml processing
-------------------------------------------------------+--------------------
 Reporter: alexey kutumov <alexey.kutumov@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: auto_index
  Version: Boost 1.52.0 | Severity: Problem
 Keywords: |
-------------------------------------------------------+--------------------
 auto_index crashes with following backtrace:

 #3 0x08126947 in std::pair<std::string, std::string>::pair
 (this=0xbf909bb8, __a=<error reading variable: Cannot access memory at
 address 0x0>, __b="end")
     at /usr/include/c++/4.7/bits/stl_pair.h:105
 #4 0x0811ef7c in process_node (node=..., prev=0xbf909ea4, pt=0xbf909e9c,
 seen=false)
     at
 /usr/src/projects/boost/modularize/src/boost/auto_index/src/auto_index.cpp:469

 I founded, that this error happens when we construct item_index:

 {{{
 std::pair<std::string, std::string> item_index(*pid, i->term);
 }}}

 with incorrect pid argument (in this case it equals to zero).
 This variable is initialized at line 455:

 {{{
 const std::string* pid = get_current_block_id(&id);
 }}}
 And this function returns 0, which causes segfault

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7967>
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:50:11 UTC