Opened 9 months ago

Last modified 9 months ago

#13516 new Bugs

crash in boost regex

Reported by: Aron Pongo <aron@…> Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc:

Description

Using a specific search and replace expression containing named tags causes boost regex to crash. The pull request at https://github.com/boostorg/regex/pull/60/commits/124dd8d0d9c636436115ec988058a551c5fa39eb turns the crash into a regex exception. Attaching the search/replace expression and the file they are used on.

Attachments (4)

find_expression.txt (779 bytes) - added by Aron Pongo <aron@…> 9 months ago.
replace_expression.txt (20 bytes) - added by Aron Pongo <aron@…> 9 months ago.
text_to_search.txt (111 bytes) - added by Aron Pongo <aron@…> 9 months ago.
example.cc (1.3 KB) - added by Aron Pongo <aron@…> 9 months ago.

Download all attachments as: .zip

Change History (5)

Changed 9 months ago by Aron Pongo <aron@…>

Attachment: find_expression.txt added

Changed 9 months ago by Aron Pongo <aron@…>

Attachment: replace_expression.txt added

Changed 9 months ago by Aron Pongo <aron@…>

Attachment: text_to_search.txt added

Changed 9 months ago by Aron Pongo <aron@…>

Attachment: example.cc added

comment:1 Changed 9 months ago by Aron Pongo <aron@…>

Attaching example.cc to show the problem. It looks like the crash is only happening if boost::u32regex is used. Using wide strings instead of strings makes the crash go away on OSX, but not on Windows. Both crash with regular strings.

A note to the pull request: it does not fix the problem, it just prevents boost from crashing.

Note: See TracTickets for help on using tickets.