[Boost-bugs] [Boost C++ Libraries] #1276: spirit problem with _GLIBCXX_DEBUG

Subject: [Boost-bugs] [Boost C++ Libraries] #1276: spirit problem with _GLIBCXX_DEBUG
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-09-22 09:45:56


#1276: spirit problem with _GLIBCXX_DEBUG
------------------------------+---------------------------------------------
 Reporter: tim_at_[hidden] | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.34.1 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
 hi all,

 when compiling the xml parser to boost::property_tree with gcc and
 defining _GLIBCXX_DEBUG to enable stl debugging, my applications aborts
 with the following message:


 {{{
 /usr/include/c++/4.2/debug/safe_iterator.h:131:error: attempt to copy-
     construct an iterator from a singular iterator.

 Objects involved in the operation:
 iterator "this" @ 0x0xbfe46690 {
 type =
 N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPKcNSt6__norm6vectorIcSaIcEEEEENSt7__debug6vectorIcS7_EEEE
 (constant iterator);
   state = singular;
 }
 iterator "other" @ 0x0xbfe467e0 {
 type =
 N11__gnu_debug14_Safe_iteratorIN9__gnu_cxx17__normal_iteratorIPKcNSt6__norm6vectorIcSaIcEEEEENSt7__debug6vectorIcS7_EEEE
 (constant iterator);
   state = singular;
 }
 }}}

 the relevant part of the backtrace is:

 {{{
> 0 Unknown PC=0xffffe410, FP=0xbfe4626c
    1 abort PC=0xb7ddc17c, FP=0xbfe46398 [/lib/i686/cmov/
 libc.so.6]
    2 _ZNK11__gnu_debug16_Error_formatter8_M_errorEv PC=0xb773c781,
 FP=0xbfe46458 [/usr/lib/libstdc++.so.6]
    3 __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<const
 char*,std::__norm::vector<char,std::allocator<char> >
>,std::__debug::vector<char,std::allocator<char> > >::_Safe_iterator
 PC=0xb5f10d59, FP=0xbfe465c8 [/usr/include/c++/4.2/debug/
 safe_iterator.h#128]
    4
 boost::iterator_adaptor<boost::spirit::position_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<const
 char*,std::__norm::vector<char,std::allocator<char> >
>,std::__debug::vector<char,std::allocator<char> >
>,boost::spirit::file_position_base<std::string>,boost::spirit::nil_t>,__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<const
 char*,std::__norm::vector<char,std::allocator<char> >
>,std::__debug::vector<char,std::allocator<char> > >,const
 char,boost::use_default,boost::use_default,boost::use_default>::not-in-
 charge iterator_adaptor PC=0xb5f10dbc, FP=0xbfe465e8 [/usr/include/boost/
 iterator/iterator_adaptor.hpp#277]
    5
 boost::spirit::position_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<const
 char*,std::__norm::vector<char,std::allocator<char> >
>,std::__debug::vector<char,std::allocator<char> >
>,boost::spirit::file_position_base<std::string>,boost::spirit::nil_t>::position_iterator
 PC=0xb5f2fa36, FP=0xbfe46618 [/usr/include/boost/spirit/iterator/
 position_iterator.hpp#217]
    6
 boost::spirit::scanner<boost::spirit::position_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<const
 char*,std::__norm::vector<char,std::allocator<char> >
>,std::__debug::vector<char,std::allocator<char> >
>,boost::spirit::file_position_base<std::string>,boost::spirit::nil_t>,boost::spirit::scanner_policies<boost::spirit::iteration_policy,boost::spirit::match_policy,boost::spirit::action_policy>
>::scanner PC=0xb5f2fafc, FP=0xbfe46648 [/usr/include/boost/spirit/core/
 scanner/scanner.hpp#231]
    7
 boost::spirit::parse<boost::spirit::position_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<const
 char*,std::__norm::vector<char,std::allocator<char> >
>,std::__debug::vector<char,std::allocator<char> >
>,boost::spirit::file_position_base<std::string>,boost::spirit::nil_t>,boost::property_tree::xml_parser::xml_grammar<boost::property_tree::basic_ptree<std::less<std::string>,std::string,boost::property_tree::basic_path<std::string>,std::string,boost::property_tree::translator>
> > PC=0xb5f5d76e, FP=0xbfe46718 [/usr/include/boost/spirit/core/impl/
 parser.ipp#27]
    8
 _ZN5boost13property_tree10xml_parser17read_xml_internalINS0_11basic_ptreeISt4lessISsESsNS0_10basic_pathISsEESsNS0_10translatorEEEEEvRSt13basic_istreamINT_8key_type10value_typeESt11char_traitsISD_EERSB_iRKSs
 PC=0xb5f635fa, FP=0xbfe46948 [/home/tim/workspace/nova/libs/property_tree/
 boost/property_tree/detail/xml_parser_read_spirit.hpp#721]
    9
 boost::property_tree::xml_parser::read_xml<boost::property_tree::basic_ptree<std::less<std::string>,std::string,boost::property_tree::basic_path<std::string>,std::string,boost::property_tree::translator>
> PC=0xb5f63a58, FP=0xbfe46ab8 [/home/tim/workspace/nova/libs/
 property_tree/boost/property_tree/xml_parser.hpp#58]
 }}}

 joel de guzman stated, that it seems to be a problem with spirit:
 http://thread.gmane.org/gmane.comp.lib.boost.devel/165261/focus=165286

 best, tim

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1276>
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:49:56 UTC