Skip to content
Tcl Source Code History Of Ticket 851747
Login

History Of Ticket 851747

Artifacts Associated With Ticket 851747

  1. Ticket change [ade2d81547] (rid 101536) by obermeier on 2003-11-30 22:07:01:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "obermeier"
    9. subsystem initialized to: "37. File System"
    10. title initialized to: "Coredump with Tcl 8.4.X (possibly binary scan)"
    11. type initialized to: "Bug"
  2. Ticket change [206b1f07df] (rid 91305) by obermeier on 2003-12-01 05:07:01:

    1. icomment:
      
      
      File Added - 69128: coredump.zip
      
      
      
    2. login: "obermeier"
    3. mimetype: "text/plain"
    4. username: "obermeier"
  3. Add attachment "coredump.zip" [f457e9d2f2] (rid 129896) by obermeier on 2003-12-01 05:07:01.

  4. Ticket change [ac1cba5cff] (rid 101237) by vincentdarley on 2003-12-01 18:57:26:

    1. assignee changed to: "dkf"
    2. foundin changed to: "obsolete: 8.4.5"
    3. 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...
      
      
      
    4. login: "vincentdarley"
    5. mimetype: "text/plain"
    6. subsystem changed to: "16. Commands A-H"
    7. username: "vincentdarley"
  5. Ticket change [ac95ff1cba] (rid 101324) by cc_benny on 2003-12-01 20:13:38:

    1. 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.
      
      
      
    2. login: "cc_benny"
    3. mimetype: "text/plain"
    4. username: "cc_benny"
  6. Ticket change [2a739bc9a8] (rid 118574) by dkf on 2003-12-01 20:15:02:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      I can reproduce this with 8.4.1 on WinXP/NTFS
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Ticket change [3541fd64c6] (rid 106890) by dkf on 2003-12-01 20:27:09:

    1. subsystem changed to: "12. ByteArray Object"
  8. Ticket change [81bfe976c1] (rid 117098) by dkf on 2003-12-01 21:28:43:

    1. priority changed to: "9 Immediate"
  9. Ticket change [13698be413] (rid 124214) by dkf on 2003-12-01 21:28:44:

    1. 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]!
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  10. Ticket change [73978128cc] (rid 105065) by dkf on 2003-12-01 21:35:18:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Minimal script (in mem-debug mode):
         set s aaaabbbbaaaa
         binary scan $s III a a a
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  11. Ticket change [fe53c62b22] (rid 108563) by dkf on 2003-12-01 21:41:45:

    1. 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.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  12. Ticket change [6ddcae5ba9] (rid 128775) by dkf on 2003-12-01 23:29:02:

    1. title changed to: "[binary scan] object sharing/reuse problem"
  13. Ticket change [eb18b3e957] (rid 103476) by dkf on 2003-12-01 23:37:48:

    1. 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.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  14. Ticket change [ed97ce92f1] (rid 103912) by dkf on 2003-12-02 16:32:30:

    1. closedate changed to: "2003-12-02T09:32:30"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      Fixed in HEAD and 8.4 branch
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"