Opened 10 years ago
Closed 10 years ago
#7967 closed Bugs (fixed)
auto_index crashes during boostbook xml processing
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | auto_index |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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
Attachments (1)
Change History (4)
by , 10 years ago
Attachment: | autoindex_issue.zip added |
---|
comment:1 by , 10 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You can't run auto_index on boostbook, only on docbook.
comment:2 by , 10 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Even if it's illegal, auto_index shouldn't crash on invalid input.
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
reproducing example