Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#8569 closed Bugs (fixed)

boost::regex crashes

Reported by: anonymous Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.52.0 Severity: Problem
Keywords: Cc:

Description

boost::wregex reg(pattern, boost::regex::perl | boost::regex::icase);

where pattern is: L"(SLA_LOG.*?)
s*{
s*PRX
s*=>
s*(
d+).*?"

Crashes when parsing pattern. Compiled under MS VS 2010. Please help.

Change History (6)

comment:1 by anonymous, 9 years ago

Sorry, but the correct pattern is: L"(FILE_TYPE.*?)\\s*{\\s*PRIO\\s*=>\\s*(\\d+).*?"

comment:2 by viboes, 9 years ago

Component: Noneregex
Owner: set to John Maddock

comment:3 by anonymous, 9 years ago

To be precisely it doesn't crash, it just generates an exception when parsing: '{' character. Perl handles this correctly, here - it has to be escaped in order to work correctly...

comment:4 by John Maddock, 9 years ago

Resolution: fixed
Status: newclosed

(In [84371]) When a {} repeat sequence is invalid or incomplete, and the language is Perl, then backtrack and treat the sequence as a literal, not a repeat operator. Fixes #8569.

comment:5 by John Maddock, 9 years ago

(In [84460]) Document bug fix. Regenerate docs. Refs #8569.

comment:6 by John Maddock, 9 years ago

(In [84463]) Merge regex bug fix. Refs #8569.

Note: See TracTickets for help on using tickets.