Artifacts Associated With Ticket 851747
Ticket change [ade2d81547] (rid 101536) by obermeier on 2003-11-30 22:07:01:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
While working with the fileType function of TclLib, I encountered core dumps on both Linux and Windows with different versions of Tcl 8.4 (8.4.2, 8.4.4, 8.4.5). The same code works with Tcl 8.3 on both platforms. I succeeded to strip down the problem to the attached code. This code applied to the four (identical) image files supplied in the attachment, dumps core. You can avoid dumping core by 1. replacing the binary scan command as noted in the code or 2. by commenting out the line "set s [file size $filename]" I noticed, that if I copy the files from the FAT32 partition to a NTFS partition, it does not dump core, but still prints out different offset values, although the files are identical. Core dumps also occur on Mac OS X with Tcl 8.4, but not with Tcl 8.3.
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "obermeier"
- subsystem initialized to: "37. File System"
- title initialized to: "Coredump with Tcl 8.4.X (possibly binary scan)"
- type initialized to: "Bug"
Ticket change [206b1f07df] (rid 91305) by obermeier on 2003-12-01 05:07:01:
- icomment:
File Added - 69128: coredump.zip
- login: "obermeier"
- mimetype: "text/plain"
- username: "obermeier"
- icomment:
Add attachment "coredump.zip" [f457e9d2f2] (rid 129896) by obermeier on 2003-12-01 05:07:01.
Ticket change [ac1cba5cff] (rid 101237) by vincentdarley on 2003-12-01 18:57:26:
- assignee changed to: "dkf"
- foundin changed to: "obsolete: 8.4.5"
- icomment:
Logged In: YES user_id=32170 I can't reproduce this (I'm on Windows and only have NTFS), although I do notice some strange behaviour regarding finding the .ppm files at all...
- login: "vincentdarley"
- mimetype: "text/plain"
- subsystem changed to: "16. Commands A-H"
- username: "vincentdarley"
Ticket change [ac95ff1cba] (rid 101324) by cc_benny on 2003-12-01 20:13:38:
- icomment:
Logged In: YES user_id=143885 The code crashes with tclsh8.4 on my Linux/PPC box and also on my Mac OS X box. No problems with tclsh8.3 on either platform. The Mac OS X version says "abort: invalid block". IOW, some routine trashes the heap. There seems to be a a buffer overwrite in that [binary scan] variant.
- login: "cc_benny"
- mimetype: "text/plain"
- username: "cc_benny"
- icomment:
Ticket change [2a739bc9a8] (rid 118574) by dkf on 2003-12-01 20:15:02:
- icomment:
Logged In: YES user_id=79902 I can reproduce this with 8.4.1 on WinXP/NTFS
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [3541fd64c6] (rid 106890) by dkf on 2003-12-01 20:27:09:
- subsystem changed to: "12. ByteArray Object"
Ticket change [81bfe976c1] (rid 117098) by dkf on 2003-12-01 21:28:43:
- priority changed to: "9 Immediate"
Ticket change [13698be413] (rid 124214) by dkf on 2003-12-01 21:28:44:
- icomment:
Logged In: YES user_id=79902 The following script reproduces the fault for me: set s \xdf\xdf\xdb\xdf\xdf\xdb\xdf\xdf\xdb\xdf\xdf\xdb\xdf\xdf\xdb\xdf binary scan $s IIII a b a a binary scan $s IIII a b a a binary scan $s IIII a b a a In mem-debug mode (8.5a0 on UNIX), the fault happens in the first [binary scan]!
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [73978128cc] (rid 105065) by dkf on 2003-12-01 21:35:18:
- icomment:
Logged In: YES user_id=79902 Minimal script (in mem-debug mode): set s aaaabbbbaaaa binary scan $s III a a a
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [fe53c62b22] (rid 108563) by dkf on 2003-12-01 21:41:45:
- icomment:
Logged In: YES user_id=79902 Commentary: This one is nasty. It depends on the value caching behaviour inside [binary scan] and requires that a variable be written three times, once with value 1, then with value 2, then with value 1 again, which the cache (unsuccessfully) tries to share. Fixing this requires either a much more expensive cache or something to detect when the same variable is being written more than twice (when a non-cached scheme has to be used.) Yuck.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [6ddcae5ba9] (rid 128775) by dkf on 2003-12-01 23:29:02:
- title changed to: "[binary scan] object sharing/reuse problem"
Ticket change [eb18b3e957] (rid 103476) by dkf on 2003-12-01 23:37:48:
- icomment:
Logged In: YES user_id=79902 Also: binary scan /g/ ccc a a a or any other triple. The requirement is a write to a particular variable at least three times with a write of a value twice interspersed with another value. The first write puts an object in the cache, the second invalidates that object, and the third write reuses the (now invalid) object.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [ed97ce92f1] (rid 103912) by dkf on 2003-12-02 16:32:30:
- closedate changed to: "2003-12-02T09:32:30"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Fixed in HEAD and 8.4 branch
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"