Re: [Boost-bugs] [Boost C++ Libraries] #3299: boost regex regex_search crash

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3299: boost regex regex_search crash
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-08-06 16:22:32


#3299: boost regex regex_search crash
------------------------------+---------------------------------------------
 Reporter: ufwt@… | Owner: johnmaddock
     Type: Bugs | Status: assigned
Milestone: Boost 1.40.0 | Component: regex
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------
Changes (by johnmaddock):

  * status: new => assigned

Comment:

 The code doesn't crash: it throws an exception that it's documented to
 throw.

 In this case it's because the number of states visited in the FSM has
 grown too large and it bails out to prevent an "eternal" match attempt.

 Perl manages to optimise this particular expression, but if you make it
 trivially more complex, say '[a-z].*(xxxxx)|x', then it takes a very long
 time indeed to return from a match attempt on your string.

 I'll leave this open for now though, as it looks like this special case
 can be optimised a little more.

 John.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3299#comment:3>
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:01 UTC