Subject: Re: [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-11-16 09:09:41
#4671: std::bad_cast crash seems to be linked to boost_regex
------------------------------------------+---------------------------------
Reporter: Spinach <spinachio@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
Version: Boost 1.44.0 | Severity: Problem
Resolution: | Keywords:
------------------------------------------+---------------------------------
Comment (by anonymous):
This is a problem with the locale you are using - for whatever reason it
doesn't contain a std::collate<char> facet - as it's required to do so by
the standard.
You could try and reproduce with:
{{{
std::locale l;
std::use_facet<std::collate<char> >(l);
}}}
and see if that also throws.
If it does, I'm not sure what the cause/solution is - it certainly should
be reported to the libstdc++ developers if it's reproducable. I'm also
not sure why we don't see this problem on any of our MacOS test machines.
As a workaround you could try defining BOOST_REGEX_USE_C_LOCALE in
boost/regex/user.hpp so the library doesn't use the C++ locale at all (and
rebuild obviously).
One final check, I note that you're building the library with
_GLIBCXX_DEBUG defined, I assume that your app is also built with that
defined? If not it will crash for sure as in general you can't mix object
files with and without that define.
HTH, John.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4671#comment:2> 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