Opened 5 years ago

Closed 5 years ago

#13126 closed Bugs (fixed)

regex with ICU crashes with named sub-expressions

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

Description

In "icu.hpp" regex match/search wrappers use internal match_results object instead of the one passed in the args. On success the results are copied, but the named sub-expressions pointer (shared with the regex object) is not copied. This pointer is not checked for validity in the methods accessing named sub-expressions.
Client code using named sub-expressions will crash with ICU wrappers (but work fine without them).

Change History (2)

comment:1 by zhivkot@…, 5 years ago

Also to add that my current workaround is to use implementation specific public methods to set the named sub-expressions pointer: myMatchResults.set_named_subs( myU32regex.get_named_subs() );

comment:2 by John Maddock, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.