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 , 5 years ago
comment:2 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for this, fixed in https://github.com/boostorg/regex/commit/5c543a8e2b88e17607885a6cc23466328c6e0e5f
Note:
See TracTickets
for help on using tickets.
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() );