Skip to content
Tcl Source Code History Of Ticket 1786481
Login

History Of Ticket 1786481

Artifacts Associated With Ticket 1786481

  1. Ticket change [0c110affce] (rid 114114) by msofer on 2007-09-02 00:23:29:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      As reported on clt (http://groups.google.com/group/comp.lang.tcl/browse_frm/thread/32fa115f8aef9d1f/51fac01c35c3b340#51fac01c35c3b340)
      
      mig@uh:~$ /home/CVS/tcl_SF_clean/unix/tclsh
      % set foo {a {b {c {d {e 1}}}}} 
      a {b {c {d {e 1}}}}
      % dict update foo a t {
          dict update t b t {
           dict update t c t {
            dict update t d t {
             dict incr t e
            }
           }
          }
         } 
      e 2
      % set foo
      Segmentation fault
      
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "9 Immediate"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "msofer"
    10. subsystem initialized to: "15. Dict Object"
    11. title initialized to: "dict causes segfault"
    12. type initialized to: "Bug"
  2. Ticket change [0d4e8db310] (rid 114339) by dkf on 2007-09-09 05:05:18:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Seems to build a recursive structure?!
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  3. Ticket change [20564f2271] (rid 91295) by dkf on 2007-09-09 05:38:02:

    1. closedate changed to: "2007-09-08T22:38:02"
    2. closer changed to: "dkf"
    3. foundin changed to: "obsolete: 8.5a7"
    4. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Fixed with a little more duplication in the evil case.
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dkf"
  4. Ticket change [5b9bb4f851] (rid 118361) by dgp on 2007-09-10 23:31:45:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      In a --enable-symbols=all build:
      
      ---- dict-21.17 start
      Test file error:
      Bad stack top 6 at pc 201 in TclExecuteByteCode (min 0, max 5)
       executing dict update t c t {
                          dict update t d t {
                              dict incr t e
                          }
                      }
      TclExecuteByteCode execution failure: bad stack top
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "dgp"
  5. Ticket change [9a2abc1cf5] (rid 110908) by dgp on 2007-09-10 23:41:24:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: NO
      
      
      kbk... but I observe that the definition of DICT_UPDATE_END (tclCompile.c:361) has the wrong value for numOperands...
      kbk... and suspect without proof that these instructions maya also have the wrong value for stackBalance or some such.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [7595f06b61] (rid 105415) by kennykb on 2007-09-10 23:43:17:

    1. icomment:
      Logged In: YES 
      user_id=99768
      Originator: NO
      
      I tried to chase this a little bit further and observe that line 213 of tclCompile.c has:
      
          {"dictUpdateEnd",  9,    -1,   2,{OPERAND_LVT4, OPERAND_AUX4}},
      /* Reflect the state of local variables (described in the aux data
       * referred to by the second immediate argument) back to the state of
       * the dictionary in the variable referred to by the first immediate
       * argument. The list of keys (popped from the stack) must be the same
       * length as the list of variables.
       * Stack:  ... keyList => ... */
      
      This caused an immediate segfault when I tried the test case with tcl_traceCompile=2
      because the numOperands is 1 and almost surely should be 2.
      
      How sure are we about stack balance?
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  7. Ticket change [d5310ffa62] (rid 123574) by dkf on 2007-09-11 03:29:43:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      That's wrong. The dictUpdateEnd entry definitely should have 2 args!
      
      It's also possible that there's a separate bug in the INST_DICT_UPDATE_END implementation. In particular, I suspect that the 'cleanup = 2;' in the last clause of it that can goto checkForCatch is wrong.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  8. Ticket change [df60144c85] (rid 115006) by msofer on 2007-09-11 04:48:04:

    1. icomment:
      Logged In: YES 
      user_id=148712
      Originator: YES
      
      The numArgs is incorrect. The variable 'cleanup' only has to be set before jumping to procesExceptionReturn, so the 'cleanup=2' is wrong but harmless.
      
      HEAD now has these fixes, but still has the stack error.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  9. Add attachment "1786481.patch" [1ee8879342] (rid 91056) by msofer on 2007-09-11 10:39:58.

  10. Ticket change [caae774576] (rid 95398) by msofer on 2007-09-11 10:39:58:

    1. icomment:
      
      
      File Added - 245085: 1786481.patch
      
      Logged In: YES 
      user_id=148712
      Originator: YES
      
      This patch fixes the issue, please review. Can dict-for use something similar?
      
      Changes in the dict-update compiler: INST_UPDATE_START now leaves the key list on the stack instead of creating a tmp var for it; INST_UPDATE_END expects to find at stacktop. The epilogue after the implicit catch for the body is reformulated, with a clearer code separation for different return codes from the body (caught vs not).
      
      The previous code left a duplicate result on the stack after TCL_OK completion?
      
      
      File Added: 1786481.patch
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  11. Add attachment "1786481-2.patch" [36ac2999ae] (rid 107150) by msofer on 2007-09-11 21:19:47.

  12. Ticket change [f3d17b70cc] (rid 129787) by msofer on 2007-09-11 21:19:47:

    1. icomment:
      
      
      File Added - 245155: 1786481-2.patch
      
      Logged In: YES 
      user_id=148712
      Originator: YES
      
      New patch, same logic. Fixed panic message, reordered to allow peephole optimisation in the normal case.
      File Added: 1786481-2.patch
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  13. Ticket change [1c646bc1c5] (rid 90596) by dkf on 2007-09-11 21:46:49:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Can't argue with patch (other than with trifling stuff that's easier to fix after it is committed). Go for it.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  14. Add attachment "test" [fd6d4412c8] (rid 108412) by msofer on 2007-09-11 21:55:12.

  15. Ticket change [27e4b4fce2] (rid 88603) by msofer on 2007-09-11 21:55:15:

    1. closedate changed to: "2007-09-11T14:55:15"
    2. closer changed to: "msofer"
    3. icomment:
      
      
      File Added - 245160: test
      
      Logged In: YES 
      user_id=148712
      Originator: YES
      
      Could not produce a test case that causes a crash. Manual verification of the original problem (wrong stack depth on TCL_OK returns from the body) can be done with the enclosed test in a --enable-symbols=all build. 
      
      Fixed in HEAD, leaving open at reduced prio in case someone comes up with a workable test.
      File Added: test
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. priority changed to: "4"
    7. status changed to: "Pending"
    8. username: "msofer"
  16. Ticket change [47b1e20789] (rid 99744) by sf-robot on 2007-09-26 09:20:08:

    1. closedate changed to: "2007-09-26T02:20:08"
    2. closer changed to: "sf-robot"
    3. icomment:
      Logged In: YES 
      user_id=1312539
      Originator: NO
      
      This Tracker item was closed automatically by the system. It was
      previously set to a Pending status, and the original submitter
      did not respond within 14 days (the time period specified by
      the administrator of this Tracker).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"