Skip to content
Tcl Source Code History Of Ticket 2553906
Login

History Of Ticket 2553906

Artifacts Associated With Ticket 2553906

  1. Ticket change [5751a60925] (rid 94468) by matzek on 2009-01-31 23:19:18:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Hi *,
      
      while testing with various incarnations of data appending to hammer the fix for #2494093, I stumbled over another one... This crash occurs in trunk, core-8-5-branch, as well as 8.4.19. The stack trace below is from HEAD (last updated today 2pm GMT). System is a Linux openSUSE 11.1 x86_64. Code to reproduce is as follows:
      
      # ----
      proc bar {} {
          set f [string repeat "DEADBEEF" 1024] ;# for the crash in AppendUtfToUtfRep()
          set r  ""
          set i  0
      
          while {1} {
      puts -nonewline stdout "$i\r"
      set fl [string length $f]
      if {($fl != [string length $r]) || 1} {
          append r [string range $f 0 $fl]
      }
      incr i $fl
          }
      }
      
      bar
      # ----
      
      The stack trace contains the first three levels with local vars, then only the calls...
      
      (gdb) bt full
      #0  0x00007ffff7b6102d in Tcl_AttemptSetObjLength (objPtr=0x637020, length=-2147467264)
          at /home/matze/cvs/tcl_head/generic/tclStringObj.c:931
      stringPtr = (String *) 0x64e0c0
      #1  0x00007ffff7b61a37 in AppendUtfToUtfRep (objPtr=0x637020, 
          bytes=0x7ffe70000940 "DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF"..., numBytes=8192)
          at /home/matze/cvs/tcl_head/generic/tclStringObj.c:1491
      stringPtr = (String *) 0x64e0c0
      newLength = 1073750016
      oldLength = 1073741824
      #2  0x00007ffff7b61625 in Tcl_AppendObjToObj (objPtr=0x637020, appendObjPtr=0x62c230)
          at /home/matze/cvs/tcl_head/generic/tclStringObj.c:1269
      stringPtr = (String *) 0x7ffe70002950
      length = 8192
      numChars = 1073750016
      allOneByteChars = 1
      bytes = 0x7ffe70000940 "DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF"...
      
      #3  0x00007ffff7b75ccf in TclPtrSetVar (interp=0x606e10, varPtr=0x607e90, arrayPtr=0x0, part1Ptr=0x0, part2Ptr=0x0, newValuePtr=0x62c230, 
          flags=516, index=1) at /home/matze/cvs/tcl_head/generic/tclVar.c:1885
      #4  0x00007ffff7afb455 in TclExecuteByteCode (interp=0x606e10, codePtr=0x649360) at /home/matze/cvs/tcl_head/generic/tclExecute.c:3365
      #5  0x00007ffff7a8e5d0 in NRCallTEBC (data=0x62bfc8, interp=0x606e10, result=0) at /home/matze/cvs/tcl_head/generic/tclBasic.c:4328
      #6  0x00007ffff7a8e28f in TclNRRunCallbacks (interp=0x606e10, result=0, rootPtr=0x0, tebcCall=0)
          at /home/matze/cvs/tcl_head/generic/tclBasic.c:4243
      #7  0x00007ffff7a8ddbc in Tcl_EvalObjv (interp=0x606e10, objc=1, objv=0x607ca0, flags=2097152)
          at /home/matze/cvs/tcl_head/generic/tclBasic.c:4026
      #8  0x00007ffff7a8fd7a in TclEvalEx (interp=0x606e10, 
          script=0x653810 "set i 1234567890\nset n /dev/zero\n\n# Tcl bug 2494093\nproc foo {n i} {\n    set f [open $n r]\n    fconfigure $f -translation binary -buffering full -buffersize 4096\n\n    upvar #0 data($n,raw) r\n    set r"..., numBytes=1157, flags=0, line=61)
          at /home/matze/cvs/tcl_head/generic/tclBasic.c:5121
      #9  0x00007ffff7a8f2b9 in Tcl_EvalEx (interp=0x606e10, 
          script=0x653810 "set i 1234567890\nset n /dev/zero\n\n# Tcl bug 2494093\nproc foo {n i} {\n    set f [open $n r]\n    fconfigure $f -translation binary -buffering full -buffersize 4096\n\n    upvar #0 data($n,raw) r\n    set r"..., numBytes=1157, flags=0)
          at /home/matze/cvs/tcl_head/generic/tclBasic.c:4822
      #10 0x00007ffff7b2ee71 in Tcl_FSEvalFileEx (interp=0x606e10, pathPtr=0x626c20, encodingName=0x0)
          at /home/matze/cvs/tcl_head/generic/tclIOUtil.c:1753
      #11 0x00007ffff7b37f62 in Tcl_Main (argc=-1, argv=0x7fffffffde68, appInitProc=0x400925 <Tcl_AppInit>)
          at /home/matze/cvs/tcl_head/generic/tclMain.c:353
      #12 0x000000000040091e in main (argc=2, argv=0x7fffffffde58) at /home/matze/cvs/tcl_head/unix/tclAppInit.c:87
      
      If I see that correctly AppendUtfToUtfRep() is missing a check against INT_MAX at some place...
      
      -- Matthias Kraft
      
    4. foundin initialized to: "obsolete: 8.6b1.1"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "matzek"
    10. subsystem initialized to: "10. Objects"
    11. title initialized to:
      integer overflow in Tcl_AttemptSetObjLength() -> SEGFAULT
      
    12. type initialized to: "Bug"
  2. Ticket change [bb028d3562] (rid 129408) by matzek on 2009-02-01 06:20:12:

    1. priority changed to: "9 Immediate"
  3. Ticket change [6b7b0178aa] (rid 128337) by dgp on 2009-02-01 08:13:32:

    1. assignee changed to: "dgp"
  4. Ticket change [1ebde4664e] (rid 91030) by dgp on 2009-02-02 12:50:11:

    1. icomment:
      
      Fix committed to HEAD.  Please test.
      
      Backports on hold until a testing report
      confirms success, and so that they can
      happen along with those for 2494093.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [bd1a4726ba] (rid 101854) by matzek on 2009-02-02 23:41:09:

    1. icomment:
      Works for me on 8.4, 8.5, head and tested with AIX, HP-UX, Solaris, and Linux...
      
      -- Matthias Kraft
      
      
    2. login: "matzek"
    3. mimetype: "text/plain"
    4. username: "matzek"
  6. Ticket change [f55f7a22e3] (rid 130096) by dgp on 2009-02-19 01:47:41:

    1. icomment:
      please give the HEAD another round
      of rigorous testing.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [1a08c25233] (rid 122905) by matzek on 2009-02-20 04:21:07:

    1. icomment:
      will do, but I am currently overloaded with paid work. It might be not before next week that I will find time ...
      
      kind regards
      -- Matthias Kraft
      
      
    2. login: "matzek"
    3. mimetype: "text/plain"
    4. username: "matzek"
  8. Ticket change [44199a5299] (rid 116660) by matzek on 2009-02-26 21:43:54:

    1. icomment:
      Used HEAD as of today, compiled and tested on various AIX, HP-UX, Linux, and Solaris machines.
      
      Looks good: It either aborts with "unable to realloc ... bytes" or with "max size for a Tcl value (2147483647 bytes) exceeded".
      
      One exception: Linux on a s390x mainframe. Here it seems the kernel is killing the process before Tcl gets a chance to abort. IIRC that's a feature of the Linux kernel.
      
      kind regards
      -- Matthias Kraft
      
      
    2. login: "matzek"
    3. mimetype: "text/plain"
    4. username: "matzek"
  9. Ticket change [7c5de4dc27] (rid 97069) by ferrieux on 2009-03-20 05:46:52:

    1. icomment:
      Re the s390 kill: if it is the oom_killer, please note that it is operates on a system-wide criterion (shortage of swap space, aka total vm exhausted). Does it realistically account for your case ? If yes, it would mean that you are actually very short on swap disk space (2G). Increasing it could help avoiding the "masking effect" and seeing the normal size threshold kick in.
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  10. Ticket change [4098ef97c3] (rid 116051) by matzek on 2009-03-20 21:31:14:

    1. icomment:
      It is the oom_killer, the machine I have available here only has 512 MB RAM and 1.5 GB swap. I cannot change that. The Mainframe is hosting quite a number of Linux VMs, changing parameters is a budget matter ...
      
      kind regards
      -- Matthias Kraft
      
      
    2. login: "matzek"
    3. mimetype: "text/plain"
    4. username: "matzek"
  11. Ticket change [63ed142b7f] (rid 92662) by ferrieux on 2009-03-20 22:12:51:

    1. icomment:
      OK, so there's no mystery left it seems. This particular machine cannot reach the 2G size needed to exhibit the wanted behavior, but for those who can, it seems the problem is solved.
      
      Don, any reason not to close ?
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  12. Ticket change [e6e7270077] (rid 104368) by dgp on 2009-03-20 22:25:42:

    1. icomment:
      again, I'm leaving open until I'm
      sure I've backported those fixes
      that make sense.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [66c6651927] (rid 102779) by dgp on 2009-04-08 01:38:31:

    1. closedate changed to: "2009-04-07T18:38:31"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      allow_comments - 1
      
      backports complete
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"