Artifacts Associated With Ticket 218351
Ticket change [3564c82704] (rid 106919) by nobody on 2000-10-26 00:56:35:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 4101 Bug Version: 8.3b2 SubmitDate: '2000-01-28' LastModified: '2000-01-28' Severity: CRIT Status: Closed Submitter: techsupp ChangedBy: hobbs OS: Windows 98 Machine: PentiumII FixedDate: '2000-10-25' ClosedDate: '2000-01-28' Name: Enrico Carniani CustomShell: No modifications. I'm using the Tk extensions over a user defined C application but it behaves the same way with the given short script. Comments: In 8.2, seems to interpret \r as it were a line terminator instead of a blank character but does not crash or hang the system. ReproducibleScript: set f [open "dostext.tcl" r] fconfigure $f -translation binary set DOStext [read $f] eval "$DOStext" Note: DOStext is a text in DOS format (i.e. every line is terminated with \n\r) and has been read by a C program (here emulated by fconfigure). If DOStext contains the following 2 lines: set TRADEMARK "Telvox Teleinformatica" tcl libraries would issue an error on the first line (in v8.2) or occasionally hang the system (v 8.3b2). Obviously if DOStext.tcl code is executed with wish or tclsh, it works. The trick of setting binary translation has been made to mime to behaviour of a brutal binary fread in C code (that is, what actually happens with my init application and cannot be changed because TCL sources are crypted). ObservedBehavior: In 8.3b2, sometimes hangs or crashes the system. DesiredBehavior: Just working. Responded to user on newsgroup: I cannot get this to crash on Windows even when I do: time {catch {eval "$DOStext"}} 10000 This is really not an error for Tcl, because by reading in the file as binary, you cause the string to actually be: set TRADEMARK \[\r][\n] "Telvox Teleinformatica" or straight as a string: set TRADEMARK \\\r\n "Telvox Teleinformatica" which is equivalent to: set TRADEMARK "\r" "Telvox Teleinformatica" This is all perfectly correct according to the syntax of the language. I guess the binary translation is necessary to handle crypted sources, but then you also have to map {\\r\n} to {\\n } in the output. That will make everything happy again. I'm not sure why you would get a crash, but the equivalent string you give is such a base case, that the hang must actually from from somewhere else. -- 01/28/2000 hobbs - foundin initialized to: "obsolete: 8.3b2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "bad "eval" behaviour on trailing "\""
- type initialized to: "Bug"
Ticket change [b50fcdf5ce] (rid 125177) by welch on 2000-10-26 08:20:08:
- closedate changed to: "2000-10-26T01:20:08"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [6a9cde2a50] (rid 128184) by dgp on 2001-04-19 11:33:33:
- closedate changed to: "2001-04-19T04:33:33"
- closer changed to: "dgp"
- resolution changed to: "Invalid"
- subsystem changed to: "27. Channel Types"
- title changed to: "bad "eval" behaviour on trailing "\""