#774 closed Bugs (Duplicate)
regex_replace is not thread safe when format = $N
Reported by: | r_emek | Owned by: | John Maddock |
---|---|---|---|
Milestone: | Component: | regex | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
When used in a multi-threaded environment, regex_replace produces wrong results when the 'fmt' parameter is $<digit> (i.e., $1, $2, etc.). If, for example, the correct results of the replacement operation is 1234, and fmt is '$0', we'll eventually get one of the following: - 12340 - $0 (The last digit of the erroneous result is usually the digit number from the format). I'm attaching a sample program that demonstrates the problem. We've seen this problem on Linux (RedHat 9, gcc version 3.2.2 20030222) and on several other platforms.
Change History (2)
Note:
See TracTickets
for help on using tickets.