Opened 5 years ago

Last modified 5 years 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@…> 5 years ago.
replace_expression.txt (20 bytes ) - added by Aron Pongo <aron@…> 5 years ago.
text_to_search.txt (111 bytes ) - added by Aron Pongo <aron@…> 5 years ago.
example.cc (1.3 KB ) - added by Aron Pongo <aron@…> 5 years ago.

Download all attachments as: .zip

Change History (5)

by Aron Pongo <aron@…>, 5 years ago

Attachment: find_expression.txt added

by Aron Pongo <aron@…>, 5 years ago

Attachment: replace_expression.txt added

by Aron Pongo <aron@…>, 5 years ago

Attachment: text_to_search.txt added

by Aron Pongo <aron@…>, 5 years ago

Attachment: example.cc added

comment:1 by Aron Pongo <aron@…>, 5 years ago

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.