Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-10-07 12:42:13


> You might want to switch RTTI off to circumvent the error. It's a
> compiler bug fixed in VC8. BTW: this thing is the reason, why the
> Wave libraries in Boost are built using <vc-7_1><rtti>off since the
> very beginning.

Thanks, that got things building OK.

The reason I was doing this was to try and reproduce the iterator misuse
problem that's being reported in the wave regressions, for example here:
http://engineering.meta-comm.com/boost-regression/CVS-RC_1_33_0/developer/output/Martin%20Wille-bin-boost-libs-wave-test-build-testwave-test-gcc-3-4-4-linux-debug.html

However instead of reproducing that error, I get an access violation here:

  testwave.exe!boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>::end() Line 618 + 0xc C++
> testwave.exe!boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
> >::size() Line 621 + 0x10 C++
  testwave.exe!boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *>::GetRefs() Line 1181 + 0x8 C++
  testwave.exe!boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char
*>::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *>(const
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> & s={...}) Line 1213 + 0x8 C++
  testwave.exe!boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *>
>::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> >(const
boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > & str={...}) Line 1453 C++
  testwave.exe!boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> >
>::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > >(const
boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > & __that={...}) + 0x13 C++
  testwave.exe!boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > >
>::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >(boost::wave::token_id id_=T_STRINGLIT, const
boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > & value_={...}, const
boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > & pos_={...}) Line 50 + 0x49 C++
  testwave.exe!boost::wave::util::macromap<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>::expand_replacement_list<_STL::list<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > >
>,boost::fast_pool_allocator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > >
>,boost::default_user_allocator_new_delete,boost::details::pool::null_mutex,32>
> >() Line 883 + 0x57 C++
  testwave.exe! ?? expand_macro<class ?? :: ?? >() Line 1104 C++
  testwave.exe!boost::wave::util::macromap<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>::expand_tokensequence_worker<boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,_STL::list<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > >
>,boost::fast_pool_allocator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > >
>,boost::default_user_allocator_new_delete,boost::details::pool::null_mutex,32>
> >() Line 489 + 0x3d C++
  testwave.exe!boost::wave::util::macromap<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>::expand_tokensequence<boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,_STL::list<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > >
>,boost::fast_pool_allocator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > >
>,boost::default_user_allocator_new_delete,boost::details::pool::null_mutex,32>
> >() Line 403 + 0x18 C++
  testwave.exe!boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>::expand_tokensequence<boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > > > >() Line 239 + 0x22 C++
  testwave.exe!boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>::pp_token(bool consider_emitting_line_directive=true) Line 713 + 0x39 C++
  testwave.exe!boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>::get_next_token() Line 563 + 0xf C++
  testwave.exe!boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>::operator()() Line 420 C++
  testwave.exe!boost::wave::util::functor_input::inner<boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
> >::ensure_initialized() Line 102 + 0xa C++
  testwave.exe!boost::wave::util::functor_input::inner<boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
> >::input_at_eof() Line 124 C++
  testwave.exe!boost::spirit::multi_pass_policies::std_deque::inner<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>::is_eof<boost::spirit::multi_pass<boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>,boost::wave::util::functor_input,boost::spirit::multi_pass_policies::ref_counted,boost::spirit::multi_pass_policies::buf_id_check,boost::spirit::multi_pass_policies::std_deque>
>() Line 346 + 0x1e C++
  testwave.exe!boost::spirit::multi_pass<boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>,boost::wave::util::functor_input,boost::spirit::multi_pass_policies::ref_counted,boost::spirit::multi_pass_policies::buf_id_check,boost::spirit::multi_pass_policies::std_deque>::operator==(const
boost::spirit::multi_pass<boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>,boost::wave::util::functor_input,boost::spirit::multi_pass_policies::ref_counted,boost::spirit::multi_pass_policies::buf_id_check,boost::spirit::multi_pass_policies::std_deque>
& y={...}) Line 1121 + 0x9 C++
  testwave.exe!boost::spirit::operator!=<boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>,boost::wave::util::functor_input,boost::spirit::multi_pass_policies::ref_counted,boost::spirit::multi_pass_policies::buf_id_check,boost::spirit::multi_pass_policies::std_deque>(const
boost::spirit::multi_pass<boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>,boost::wave::util::functor_input,boost::spirit::multi_pass_policies::ref_counted,boost::spirit::multi_pass_policies::buf_id_check,boost::spirit::multi_pass_policies::std_deque>
& x={...}, const
boost::spirit::multi_pass<boost::wave::impl::pp_iterator_functor<boost::wave::context<_STL::_DBG_iter<_STL::_Nondebug_string<char,_STL::char_traits<char>,_STL::allocator<char>
>,_STL::_Const_traits<char>
>,boost::wave::cpplexer::lex_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,_STL::char_traits<char>,_STL::allocator<char>,boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,_STL::allocator<char>
>,char *> > > >
>,boost::wave::iteration_context_policies::load_file_to_string,boost::wave::context_policies::default_preprocessing_hooks>
>,boost::wave::util::functor_input,boost::spirit::multi_pass_policies::ref_counted,boost::spirit::multi_pass_policies::buf_id_check,boost::spirit::multi_pass_policies::std_deque>
& y={...}) Line 1173 + 0xc C++
  testwave.exe!testwave_app::preprocess_file(_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char>
> filename={...}, const
_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > &
instr={...},
_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > &
result={...},
_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char> > &
error={...}) Line 1054 + 0x3c C++
  testwave.exe!testwave_app::test_a_file(_STL::basic_string<char,_STL::char_traits<char>,_STL::allocator<char>
> filename={...}) Line 291 + 0x32 C++
  testwave.exe!main(int argc=6, char * * argv=0x00326d28) Line 189 + 0x28
C++
  testwave.exe!mainCRTStartup() Line 398 + 0x11 C

I suspect the two could be related, but I'm not sure.

Regards, John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk