Artifacts Associated With Ticket 3610026
Ticket change [5390095040] (rid 93780) by hlinnaka on 2013-04-04 16:50:39:
- assignee initialized to: "pvgoran"
- cmimetype initialized to: "text/plain"
- comment initialized to:
If a regular expression is parsed into more than 32k colors, you get a crash. I initially spotted this in PostgreSQL (http://www.postgresql.org/message-id/[email protected]), but TCL shares the same code and thus has the same bug. Attached is a TCL test script to reproduce this. Here's a link to the PostgreSQL commit that fixed this: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=bf2b0a147857f63daa2e5c17eed0169861371af8. It should apply to TCL sources with minimal changes.
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "hlinnaka"
- subsystem initialized to: "43. Regexp"
- title initialized to:
A regular expression with > 32k "colors" causes a segfault
- type initialized to: "Bug"
Add attachment "tclcrash.tcl" [e93b13e873] (rid 104782) by hlinnaka on 2013-04-04 23:50:40.
Ticket change [f25322e797] (rid 109518) by hlinnaka on 2013-04-04 23:50:40:
- icomment:
File Added - 462305: tclcrash.tcl
- login: "hlinnaka"
- mimetype: "text/plain"
- username: "hlinnaka"
- icomment:
Ticket change [01e5398d2f] (rid 119564) by dgp on 2013-04-05 00:21:07:
- assignee changed to: "dgp"
- icomment:
What encoding is that demo file in ? It appears mangled.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [fb3ba8646a] (rid 92017) by dgp on 2013-04-05 00:27:08:
- icomment:
It appears the segfault is avoided in Tcl 8.6, probably due to the DUP_TRAVERSE_MAX_DEPTH limits imposed there. I see the segfault in Tcl 8.5. though. A tidier demo convertible to a test case would be welcome. I will get to it eventually.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "dgp"
- icomment:
Ticket change [45c187447d] (rid 99405) by dgp on 2013-04-05 03:24:31:
- icomment:
Simpler demo: set e {} set cp 99 while {$cp < 35000} { append e [format %c [incr cp]] } regexp -about $e - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [5306e8af96] (rid 126412) by dgp on 2013-04-08 22:17:31:
- icomment:
Branch bug-3610026 contains the test and the (slightly adapted) patch. It's good to stop the crash. The only significant problem with this patch is that the test requires 10s of seconds to run, at least on my machine. I'd like opinions on whether we should constrain it to not run on every make test for that reason.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [0f0effcccb] (rid 94725) by dgp on 2013-04-08 22:17:32:
- assignee changed to: "dkf"
Ticket change [f22472ef0e] (rid 109488) by dgp on 2013-04-08 22:17:41:
- icomment:
Branch bug-3610026 contains the test and the (slightly adapted) patch. It's good to stop the crash. The only significant problem with this patch is that the test requires 10s of seconds to run, at least on my machine. I'd like opinions on whether we should constrain it to not run on every make test for that reason.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [4dd8cb4623] (rid 127126) by dkf on 2013-04-09 01:59:46:
- icomment:
It takes 5-6 seconds on this rather elderly machine, which is acceptable. (Your system must be even older, and this machine's now old enough to be of school age!) I don't think the test is looking for the right result though. Either it's looking for a non-crash (in which case we ought to allow for success) or it should look for the specific new error message. I'm cool either way, but the current "gimme an error, any error" feels uncomfortable given that the rest of the file does lots of testing for specific errors.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [62e6c0ff76] (rid 92487) by dkf on 2013-04-09 01:59:56:
- icomment:
IP - Comment Removed: 82.42.214.208
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [1bc9a01ccd] (rid 123207) by dgp on 2013-04-09 02:45:58:
- assignee changed to: "dgp"
- icomment:
Fix committed for Tcl 8.4.20.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [6656611058] (rid 102695) by dgp on 2013-04-09 03:07:12:
- closedate changed to: "2013-04-08T20:07:12"
- closer changed to: "dgp"
- foundin changed to: "current: 8.5.14"
- icomment:
allow_comments - 1 and 8.5.15 and 8.6.1.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"