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
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
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
Core dumps also occur on Mac OS X with Tcl 8.4, but
not with Tcl 8.3.