Overview
| Artifact ID: | 3e9cf926a1d62532a6818b7945bc8b9700ab2318 |
|---|---|
| Ticket: | 0e0e150e49479e3f3f7b20efa1817813216fe2ad
Fix for quantified regexp back-references |
| User & Date: | tgl on 2015-09-19 15:55:29 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
The attached patch solves the problems with quantified back-references that were previously discussed in http://core.tcl.tk/tcl/tktview?name=1115587 This patch represents a port of work that's been done on Postgres' copy of the regexp library over the past several years, specifically these commits: 5223f96d92fd6fb6fcf260da9f9cb111831f0b37 173e29aa5deefd9e71c183583ba37805c8102a72 3cbfe485e44d055b9e6a27e47069729375059f8c 4dd78bf37aa29d04b3f358b08c4a2fa43cf828e7 2a4c46e0baf2d51117cd4468b28705d01ffcbff9 3694b4d7e1aa02f917f9d18c550fbb49b96efa83 which you can look at in the Postgres repo at http://git.postgresql.org/gitweb/?p=postgresql.git if you want a sense of the development history. This submission would probably be easier to follow if I'd submitted individual patches equivalent to each of those steps ... but transposing code between Postgres and Tcl layout conventions is enough of a pain in the rear that I couldn't muster the energy to do it repeatedly. In fact, this still doesn't follow Tcl layout conventions very well, partly because I'm not totally certain what they are. I'm hoping you have a suitable reformatting tool. Anyway, the core of the fix is to introduce an explicit "iteration" subre type, rather than relying completely on a compile-time transformation, as I'd speculated about in my comments in 1115587. Subsequent cleanup includes getting rid of the useless "retry memory" stuff and folding the parallel dissect() and cdissect() code paths into a single implementation, which is why the regexec.c changes are so bulky-looking. We've been using this successfully in Postgres for several years, with only a couple of minor bugs discovered (see the last two commits mentioned above). So I now feel confident enough in it to recommend that you adopt it. This supersedes my previous submission at ticket 3487443, which I've now closed.
- foundin changed to: "8.6.4"
- is_private changed to: "0"
- login: "tgl"
- priority changed to: "5 Medium"
- private_contact changed to: "26864b65f1c6ce8bda86f87ed9c554e19ac0390d"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "tgl"
- subsystem changed to: "43. Regexp"
- title changed to: "Fix for quantified regexp back-references"
- type changed to: "Patch"