Re: [Boost-users] Boost.Regex - why does it core dump?

1) add a try catch block and verify that the dump isn't a result of an
uncaught exception. Done. Same result.
2) provide a backtrace?
Okay; here it is: Program terminated with signal 11, Segmentation fault. #0 0x407c851 in boost::detail::atomic_increment (pw=0x400087a4) at sp_counted_base_gcc_ia64.hpp:38 38 "r"(pw)); (gdb) backtrace #0 0x407c851 in boost::detail::atomic_increment (pw=0x400087a4) at sp_counted_base_gcc_ia64.hpp:38 #1 0x407cc60 in boost::detail::sp_counted_base::add_ref_copy (this=0x400087a0) at sp_counted_base_gcc_ia64.hpp:117 #2 0x407cdb0 in boost::detail::shared_count::shared_count (this=0x7ffff0f8, r=@0x7ffff128) at shared_count.hpp:170 #3 0x4087700 in boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char
::boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<c
har> > (this=0x7ffff0f4) at shared_ptr.hpp:106 #4 0x40af160 in std::pair<boost::shared_ptr<boost::re_detail::cpp_regex_traits_implement ation<char> >,boost::re_detail::cpp_regex_traits_base<char> const*
::std::pair<boost::shared_ptr<boost::re_detail::cpp_regex_traits_implem entation<char> >,boost::re_detail::cpp_regex_traits_base<char> const* > (this=0x7ffff0f4, __a=@0x7ffff124, __b=@0x7ffff0f0) at stl_pair.h:85 #5 0x4119f40 in boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>,boost: :re_detail::cpp_regex_traits_implementation<char> >::do_get ( k=@0x7ffff1b0, max_cache_size=5) at object_cache.hpp:122 #6 0x411b190 in boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>,boost: :re_detail::cpp_regex_traits_implementation<char> >::get ( k=@0x7ffff1b0, max_cache_size=5) at object_cache.hpp:78 #7 0x411b250 in boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char
boost::re_detail::create_cpp_regex_traits<char> (l=@0x7ffff1e0) at cpp_regex_traits.hpp:822 #8 0x411b380 in boost::cpp_regex_traits<char>::boost::cpp_regex_traits<char> ( this=0x40008760) at cpp_regex_traits.hpp:842 #9 0x411b480 in boost::regex_traits<char,boost::cpp_regex_traits<char> ::boost::regex_traits<char,boost::cpp_regex_traits<char> > (this=0x40008760) at regex_traits.hpp:68 #10 0x411b500 in boost::regex_traits_wrapper<boost::regex_traits<char,boost::cpp_regex_tr aits<char> > ::boost::regex_traits_wrapper<boost::regex_traits<char,boost::cpp_regex _traits<char> > > (this=0x40008760) at regex_traits.hpp:162 #11 0x411b5b0 in boost::re_detail::regex_data<char,boost::regex_traits<char,boost::cpp_re gex_traits<char> > ::boost::re_detail::regex_data<char,boost::regex_traits<char,boost::cpp _regex_traits<char> > > (this=0x4000f410) at basic_regex.hpp:54 #12 0x411b740 in boost::re_detail::basic_regex_implementation<char,boost::regex_traits<ch ar,boost::cpp_regex_traits<char> > ::boost::re_detail::basic_regex_implementation<char,boost::regex_traits <char,boost::cpp_regex_traits<char> > > ( this=0x4000f410) at basic_regex.hpp:85 #13 0x411b880 in boost::basic_regex<char,boost::regex_traits<char,boost::cpp_regex_traits <char> > >::do_assign (this=0x7ffff2d8, p1=0x404d950 ".", p2=0x404d951 "", f=0) at basic_regex.hpp:517 #14 0x4079f10 in boost::basic_regex<char,boost::regex_traits<char,boost::cpp_regex_traits <char> > >::assign+0x90 () #15 0x407a000 in boost::basic_regex<char,boost::regex_traits<char,boost::cpp_regex_traits <char> > >::assign+0xc0 () #16 0x407a100 in boost::basic_regex<char,boost::regex_traits<char,boost::cpp_regex_traits <char> > ::boost::basic_regex<char,boost::regex_traits<char,boost::cpp_regex_tra its<char> > >+0xd0 () #17 0x4067ee0:0 in ValidateArgs+0x430 () #18 0x4068800:0 in main+0xc0 () Current language: auto; currently c++
************************************************************************* The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please resend this communication to the sender and delete the original message or any copy of it from your computer system. Thank you. *************************************************************************

2) provide a backtrace?
Okay; here it is:
Oh !*^% it's an outstanding shared_ptr bug: if you define BOOST_SP_USE_PTHREADS both when building regex and again in your application this problem will go away. I'll go off and nag the people responsible ;-> John.
participants (2)
-
John Maddock
-
Smith Matt - matsmi