Hi John, Will give that a go. I also downloaded a prebuild from CERN and will give that a rip also. Our feelings also suggested wrong calling convention, or some clash of binary compatability problem. We kind of thought the test program would suffer the same fate. We have exactly the same compiler / linker flags. :-( The really strange thing is that we are trying all of this with VS2005, but the same code has the same problem in VC6 and a much earlier version of boost, but only in unicode. Config.hpp shows * Copyright (c) 1998-2000 and cregexw.hpp shows * LOCATION: see http://www.boost.org for most recent version. * FILE cregex.cpp * VERSION 3.12 * DESCRIPTION: Declares POSIX API functions * + boost::RegEx high level wrapper. Thanks in advance, Alan
From: "John Maddock"
Reply-To: boost-users@lists.boost.org To: Subject: Re: [Boost-users] Regex crash Date: Thu, 10 Aug 2006 09:56:00 +0100 Alan Gray wrote:
Hi John,
I cannot reproduce the problem in a sample program (yet). The symptions appear to be stack corruption. In the function
template <class charT>
w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::re_detail::lcid_type
l) : w32_regex_traits_base<charT>(l) {
line 187: w32_regex_traits.hpp
the line
std::string cat_name(w32_regex_traits<charT>::get_catalog_name());
executes ok, looking at the debugger, _Mysize = 0 , _Myres = 15 which is expected. Then stepping into
if(cat_name.size())
inside the call, _mysize is now equal to some crazy number. The interesting point is that the debugger steps to the line
The only thing that springs to mind is a binary compartibitity issue: either linking to the wrong regex lib build, multiple std lib's linked to your app, or some obscure compiler option that's rendered the prebuilt lib's incompatible with your app. As a quick test try adding the regex source directly to your project and building with BOOST_REGEX_NO_LIB defined. (Note this will make your app a lot "fatter" than it needs to be, but it's a useful sanity check).
HTH, John.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users