Artifacts Associated With Ticket 1027690
Ticket change [3c5be37c7e] (rid 120906) by wobster on 2004-09-14 04:58:01:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I just checked out the head of the 8.4 branch. It appears that there is a bug related to the "read" command when executing this test case: set f [open "myfile" r] set contents [read $f [file size "myfile"]] nothing is read. But, if you do this: set bytes [file size "myfile] set contents [read $f $bytes] it works fine. This worked in earlier versions of 8.4. p.s. please delete previous bug report. I wasn't logged in when I submitted the bug.
- foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "wobster"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to:
read $channel [file size "myfile"] doesn't work in 8.4 head
- type initialized to: "Bug"
Ticket change [7fb2bc87bc] (rid 97600) by wobster on 2004-09-14 11:58:42:
- priority changed to: "8"
Ticket change [1de5752c18] (rid 90885) by dkf on 2004-09-14 15:07:56:
- icomment:
Logged In: YES user_id=79902 As a workaround, try just doing this: set contents [read $f] as that's been tuned to work fast in all releases of 8.4.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [d2523c1111] (rid 113516) by dkf on 2004-09-14 15:21:56:
- assignee changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=79902 Can't tell if this is a fault with [file size] (when it belongs to category 36) or [read] (which I've assigned it to for now.) What is the size of that file BTW, or does that not matter?
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Works For Me"
- subsystem changed to: "24. Channel Commands"
- username: "dkf"
Ticket change [7bc473235d] (rid 96962) by wobster on 2004-09-14 17:43:46:
- icomment:
Logged In: YES user_id=60261 Thanks for the tip. It appears that the problem is OS-specific. It doesn't work on Solaris and Irix, but does on Linux. Actually, it looks like it's a problem with read. I tried this test as well: % pwd /tmp/bak/tcl8.4.7/unix % set f [open "Makefile" r] file6 % puts [file size "Makefile"] 50346 % read $f [file size "Makefile"] % read $f $size ; # nothing printed % read $f 50346 # Generated automatically from Makefile.in by configure. ... For some reason, this works as well: read $f [expr [file size "Makefile"] - 1] The file size is actually 50346 by the way according to "ls -l" and "wc -c".
- login: "wobster"
- mimetype: "text/plain"
- username: "wobster"
- icomment:
Ticket change [12c46ae49b] (rid 124104) by dgp on 2004-09-14 22:35:11:
- icomment:
Logged In: YES user_id=80530 confirmed on Solaris 9. Bug *not* present in the Tcl 8.5 development branch.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [1b6acdbc76] (rid 123145) by dgp on 2004-09-14 22:51:43:
- icomment:
Logged In: YES user_id=80530 Can the original submitter confirm this is a new bug, present in the 8.4 development branch, but not in the Tcl 8.4.7 release ?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7b2a4310b7] (rid 90475) by dgp on 2004-09-14 23:04:03:
- assignee changed to: "kennykb"
- icomment:
Logged In: YES user_id=80530 Appears the patch for bug 868489 introduced this. Thanks for the testing to discover this quickly!
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Remind"
- subsystem changed to: "10. Objects"
- username: "dgp"
Ticket change [aebbbb28cc] (rid 101692) by dgp on 2004-09-14 23:28:32:
- assignee changed to: "dgp"
- icomment:
File Added - 101481: 1027690.patch Logged In: YES user_id=80530 Here's the fix.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "dgp"
Add attachment "1027690.patch" [1bf2f990c5] (rid 123240) by dgp on 2004-09-14 23:28:32.
Ticket change [8927cff475] (rid 131986) by dgp on 2004-09-14 23:30:48:
- closedate changed to: "2004-09-14T16:30:48"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 fix committed.
- login: "dgp"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "dgp"
Ticket change [f6bb8f5afb] (rid 130345) by wobster on 2004-09-15 08:50:26:
- icomment:
Logged In: YES user_id=60261 Thanks for the lightning fast fix! That must be a record. Now, we can confidently migrate to 8.4.7+ without changing our sources. :-)
- login: "wobster"
- mimetype: "text/plain"
- username: "wobster"
- icomment: