Overview
| Artifact ID: | 20095f41925deeef199d1634b4b0c5648d433ff0 |
|---|---|
| Ticket: | a4a7f2abd376b2806073d2865f07b7d910b04574
Tcl [string match] and [glob] are exponential complexity for bad patterns, could be linear |
| User & Date: | aku on 2017-05-02 14:00:13 |
Changes
- icomment:
Agree regarding #3. Regarding the other I plan to read glob(3) first before having a strong opinion. My weak opinion is to follow glob(3). (Want to see if they give a reason for `malformed` => match as literal) (And see how strong `string match` already follows/deviates from this). The original blog article which brought this to my attention unfortunately is not looking at handling `[...]` at all. As a side note my first slap-dash attempt at the fix yesterday late night went sideways, breaking `glob`, I believe (`package require tcltest` failed, wrongly not finding the package anymore). Glad to see that I caught your interest. Note, two of the matcher variants (TclUniChar(Case)Match) are in tclUtf.c. The overall structure of all variants is the same, with differences in (1) the character type used and associated increment operations, and (2) (non)handling of `nocase`.
- login: "aku"
- mimetype: "text/plain"