[Boost-bugs] [Boost C++ Libraries] #4671: std::bad_cast crash seems to be linked to boost_regex

Subject: [Boost-bugs] [Boost C++ Libraries] #4671: std::bad_cast crash seems to be linked to boost_regex
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-09-21 22:29:25


#4671: std::bad_cast crash seems to be linked to boost_regex
-----------------------------------------+----------------------------------
 Reporter: Spinach <spinachio@…> | Owner:
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: |
-----------------------------------------+----------------------------------
 I've gotten the exact same code compiled on Ubuntu and am now trying to
 get my program working on a MacOS 10.6.4. I installed boost 1.4.4 as root
 using
 ./bootstrap.sh and then
 ./bjam

 I also performed the following:
 ./bjam install variant=debug define=_GLIBCXX_DEBUG --with-regex

 I compiled the program using Codeblocks (without any errors) but when I
 run the program I get the following error:

 {{{

 }}}


 {{{
 ./graph_search
 terminate called after throwing an instance of 'std::bad_cast'
   what(): std::bad_cast
 Abort trap
 }}}

 When I look into the error using Console, I see the following error

 {{{
 Thread 0 Crashed: Dispatch queue: com.apple.main-thread
 0 libSystem.B.dylib 0x00007fff837c33d6 __kill + 10
 1 libSystem.B.dylib 0x00007fff83863972 abort + 83
 2 libstdc++.6.dylib 0x00007fff826785d2 __tcf_0 + 0
 3 libstdc++.6.dylib 0x00007fff82676ae1
 __cxxabiv1::__terminate(void (*)()) + 11
 4 libstdc++.6.dylib 0x00007fff82676b16
 __cxxabiv1::__unexpected(void (*)()) + 0
 5 libstdc++.6.dylib 0x00007fff82676bfc
 __gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*) + 0
 6 libstdc++.6.dylib 0x00007fff8263293f
 std::__throw_bad_alloc() + 0
 7 libboost_regex.dylib 0x00000001000c34b8
 std::collate<char> const& std::use_facet<std::collate<char> >(std::locale
 const&) + 85 (locale_facets.tcc:117)
 8 libboost_regex.dylib 0x000000010009b794
 boost::re_detail::cpp_regex_traits_base<char>::imbue(std::locale const&) +
 124 (cpp_regex_traits.hpp:218)
 9 libboost_regex.dylib 0x00000001000cde35
 boost::re_detail::cpp_regex_traits_base<char>::cpp_regex_traits_base(std::locale
 const&) + 43 (cpp_regex_traits.hpp:173)
 10 libboost_regex.dylib 0x00000001000cde83
 boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char>
 const> boost::re_detail::create_cpp_regex_traits<char>(std::locale const&)
 + 30 (cpp_regex_traits.hpp:852)
 11 libboost_regex.dylib 0x00000001000cdeed
 boost::cpp_regex_traits<char>::cpp_regex_traits() + 35
 (cpp_regex_traits.hpp:872)
 12 libboost_regex.dylib 0x00000001000cdf33
 boost::regex_traits<char, boost::cpp_regex_traits<char> >::regex_traits()
 + 21 (regex_traits.hpp:75)
 13 libboost_regex.dylib 0x00000001000cdf4b
 boost::regex_traits_wrapper<boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::regex_traits_wrapper() + 21
 (regex_traits.hpp:169)
 14 libboost_regex.dylib 0x00000001000cdf8d
 boost::re_detail::regex_data<char, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::regex_data() + 63 (basic_regex.hpp:212)
 15 libboost_regex.dylib 0x00000001000ce041
 boost::re_detail::basic_regex_implementation<char,
 boost::regex_traits<char, boost::cpp_regex_traits<char> >
>::basic_regex_implementation() + 21 (basic_regex.hpp:248)
 16 libboost_regex.dylib 0x000000010009b815
 boost::basic_regex<char, boost::regex_traits<char,
 boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*,
 unsigned int) + 75 (basic_regex.hpp:698)
 17 graph_search 0x00000001000055e5 main + 773
 18 graph_search 0x0000000100001048 start + 52

 Thread 0 crashed with X86 Thread State (64-bit):
   rax: 0x0000000000000000 rbx: 0x00007fff7066e2d8 rcx:
 0x00007fff5fbfdc18 rdx: 0x0000000000000000
   rdi: 0x000000000000a367 rsi: 0x0000000000000006 rbp:
 0x00007fff5fbfdc30 rsp: 0x00007fff5fbfdc18
    r8: 0x0000000000000000 r9: 0x0000000100600460 r10:
 0x00007fff837bf412 r11: 0x0000000000000202
   r12: 0x00007fff8267b530 r13: 0x0000000100600420 r14:
 0x0000000000000000 r15: 0x0000000000000000
   rip: 0x00007fff837c33d6 rfl: 0x0000000000000202 cr2:
 0x00007fff7067f058
 }}}

 I would be so appreciative of any help anyone could provide.

 Thank you,
 Spinach

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