|
Boost : |
From: Eric Niebler (eric_at_[hidden])
Date: 2007-10-16 19:49:34
Boris Gubenko wrote:
> test_actions crashes when std::string is trying to dereference _C_data
> member which happens to be zero. It happens inside regex_match().
> Attached slightly reduced reproducer.
>
> test_symbols.cpp has a similar call to regex_match() and I'm sure it
> crashes for the same reason.
>
> Just rearranging the code in RW library <string> header makes the
> crash disappear which may be indicative of a code generation problem.
> And everything is fine when compiling with g++ 4.2.1.
>
> I suggest, unless you have a reason to believe that it may be some
> code in xpressive that is causing the problem, we treat these test
> failures as aC++ code generation problem at this point. We'll
> investigate it and report back.
>
> #include <boost/xpressive/xpressive_static.hpp>
> #include <boost/xpressive/regex_actions.hpp>
> extern "C" int puts(const char*);
>
> namespace xp = boost::xpressive;
>
> int main()
> {
> using namespace boost::xpressive;
>
> std::string result;
> std::string str("foo bar");
> sregex rx = (+_w)[ xp::ref(result) += _ ] >> *(' ' >> (+_w)[ xp::ref(result)
> += ',' + _ ]);
> puts("calling regex_match");
> regex_match(str, rx);
> puts("exiting");
> }
>
Hi, Boris. Is there any news about this issue? Can you suggest a
work-around or should I mark these failures expected?
-- Eric Niebler Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk