Artifacts Associated With Ticket 3603557
Ticket change [6f8d2bd638] (rid 100335) by jomills on 2013-02-06 13:23:29:
- assignee initialized to: "pvgoran"
- cmimetype initialized to: "text/plain"
- comment initialized to:
When I run the following test using tcl8.5 on Debian Squeeze (8.5.8-2) it works just fine, but when I try the same test using 8.6.0~b2-1 on the same PC I get the following error. couldn't compile regular expression pattern: out of memory I've looked to see if this bug had already been reported but I cound't find it, so apologies if I have raised a duplicate, I've checked whether a newer version of 8.6 is available in Sid but it doens't look like it to me. jmills@jo:~$ tclsh8.5 tclsh8.5 [~]source jotest.tcl tclsh8.5 [~]jotest [list TETRA_MODE_CMD ETS_2_2 CONTINUOUS 32 1 FALSE FALSE 512 8192 BOTH UNKNOWN TRUE 300 NORMAL NONE 10 1 0 25 -125 -33 720 -100 0 3 1111111111111111 110101110000 IMMEDIATE 5 15 0 0 0 FALSE 2 FALSE DISABLED] 1 tclsh8.5 [~]exit jmills@jo:~$ tclsh8.6 tclsh8.6 [~]source jotest.tcl tclsh8.6 [~]jotest [list TETRA_MODE_CMD ETS_2_2 CONTINUOUS 32 1 FALSE FALSE 512 8192 BOTH UNKNOWN TRUE 300 NORMAL NONE 10 1 0 25 -125 -33 720 -100 0 3 1111111111111111 110101110000 IMMEDIATE 5 15 0 0 0 FALSE 2 FALSE DISABLED] couldn't compile regular expression pattern: out of memory while evaluating {jotest [list TETRA_MODE_CMD ETS_2_2 CONTINUOUS 32 1 FALSE FALSE 512 8192 BOTH UNKNOWN TRUE 300 NORMAL NONE 10 1 0 25 -125 -33 720 -100 0 3 1111111111111111 110101110000 IMMEDIATE 5 15 0 0 0 FALSE 2 FALSE DISABLED]} tclsh8.6 [~]exit - foundin initialized to: "obsolete: 8.6b2"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "jomills"
- subsystem initialized to: "43. Regexp"
- title initialized to:
couldn't compile regular expression pattern: out of memory
- type initialized to: "Bug"
Add attachment "jotest.tcl" [df0e2d96ad] (rid 114954) by jomills on 2013-02-06 20:23:30.
Ticket change [23e23bcd6c] (rid 131011) by jomills on 2013-02-06 20:23:30:
- icomment:
File Added - 460201: jotest.tcl
- login: "jomills"
- mimetype: "text/plain"
- username: "jomills"
- icomment:
Ticket change [077a28ac4b] (rid 89407) by dgp on 2013-02-07 00:49:22:
- assignee changed to: "dkf"
- icomment:
2008-07-01 14:29:11 1ab85d8c7df2ba97 BAD CURRENT 2008-07-01 13:24:06 a8de9c95aa018165 GOOD $ fossil status ... comment: Add focussed stack limiting to the RE compiler. Tuning might not yet be right but it passes everything normally checked in the test suite. [Bug 1905562] (user: dkf) - login: "dgp"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "dgp"
Ticket change [1114ae52b0] (rid 95080) by dkf on 2013-02-07 02:50:19:
- icomment:
That RE is 8163 characters long. With 68 capturing sub-REs. ... ... ... I guess we can fix this by raising the limit, especially given that Tcl no longer makes the stack bloat up hugely, but *dude*, the input is still morally wrong.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [d710ffc9d3] (rid 123914) by jomills on 2013-02-07 03:14:04:
- icomment:
> > but *dude*, the input is still morally wrong. > Apologies, I've started to read up on how I should be parsing such messages.
- login: "jomills"
- mimetype: "text/plain"
- username: "jomills"
- icomment:
Ticket change [8ec93d585f] (rid 120171) by dkf on 2013-02-07 16:30:02:
- icomment:
Confirming that raising the limit to 1000 gives enough room. Can we use that RE as part of our test suite? It might be not very nice (indeed, you'd find it more efficient to use (?:[[:blank:]]+) instead of ([[:blank:]]+) for the padding, so avoiding capturing it at all) but it does apparently stress part of the code that we didn't expect to get hit that way; it's worth something *as part of a test*. Testing of edge cases *isn't* nice in the first place! Won't commit anything until I've got a confirmed test case in place; we want to ensure that we don't hit unexpected problems in the future too. ;-)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [b1e32e4f1d] (rid 98238) by dkf on 2013-02-07 16:34:24:
- icomment:
Also, I'll expose the limit a bit better so that it can be boosted in future by defining a symbol in the makefile. We shouldn't remove the depth check entirely — that'd be an invitation to a stack smash — but we can make it tunable in 8.6.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [b9f6dcc942] (rid 129235) by jomills on 2013-02-07 17:09:55:
- icomment:
> > Can we use that RE as part of our test suite? > Please feel free, strangely enough the code is from a test harness. And thanks for the tip about using (?:[[:blank:]]+), I'll make this change.
- login: "jomills"
- mimetype: "text/plain"
- username: "jomills"
- icomment:
Ticket change [8ce7e25e4f] (rid 127815) by dkf on 2013-02-08 09:27:49:
- closedate changed to: "2013-02-08T02:27:49"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 Thanks. Now verified fixed (with a limit of 700, compile-time overridable) on trunk. Myself? I'd not try to verify such a large string by a single regular expression; the issue is that in a failure, reporting what failed to match is difficult (the RE just says "didn't match" and not why). But that's by-the-by.
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"