Skip to content
Tcl Source Code History Of Ticket 1445454
Login

History Of Ticket 1445454

Artifacts Associated With Ticket 1445454

  1. Ticket change [7b649278e6] (rid 90506) by avl42 on 2006-03-08 08:30:51:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      on a fresh tclsh8.5:
      % incr foo(1)
      1
      # so far so good, but:
      % proc abc {} { incr foo(1) }
      % abc
      can't read "foo(1)": no such variable
      
      (with scalars it works both ways)
      
      
    4. foundin initialized to: "obsolete: 8.5a3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "avl42"
    9. subsystem initialized to: "17. Commands I-L"
    10. title initialized to: "incr on undefined array fails in procedures"
    11. type initialized to: "Bug"
  2. Ticket change [abe67a6bc1] (rid 101198) by dkf on 2006-03-08 16:02:48:

    1. assignee changed to: "msofer"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      Looks to be a difference in behaviour between bytecodes. :-(
      
      % set tcl_traceExec 3; time {incr foo(1)}; set tcl_traceExec 0
      1: (10) invoking "time" "incr foo(1)"
      
      Executing ByteCode 0x814d960, refCt 2, epoch 0, interp
      0x8158d50 (epoch 0)
        Source: "incr foo(1)"
        Cmds 1, src 11, inst 7, litObjs 2, aux 0, stkDepth 2,
      code/src 10.91
        Code 120 = header 100+inst 7+litObj 8+exc 0+aux 0+cmdMap 4
        Starting stack top=1
       2:  1 (0) push1 0      # "foo"
       2:  2 (0) push1 0 => "foo"
       2:  2 (2) push1 1      # "1"
       2:  3 (2) push1 1 => "1"
       2:  3 (4) incrArrayStkImm +1
       2:  3 (4) incrArrayStkImm "foo(1)" (by 1) => 1
       2:  2 (6) done
       2:  2 (6) done => return code=0, result="1"
      
         ... no enclosing catch, returning TCL_OK
      0
      % set tcl_traceExec 3;catch { abc }; set tcl_traceExec 0
      1: (18) invoking "abc"
      Calling proc "abc"
      
      Executing ByteCode 0x814d260, refCt 2, epoch 0, interp
      0x8158d50 (epoch 0)
        Source: "incr foo(1)"
        Cmds 1, src 11, inst 6, litObjs 1, aux 0, stkDepth 1,
      code/src 10.91
        Code 120 = header 100+inst 6+litObj 4+exc 0+aux 0+cmdMap 4
        Proc 0x816fb90, refCt 2, args 0, compiled locals 1
        Starting stack top=24
       2: 24 (0) push1 0      # "1"
       2: 25 (0) push1 0 => "1"
       2: 25 (2) incrArray1Imm %v0 +1         # var "foo"
       2: 25 (2) incrArray1Imm 0 "1" (by 1) => ERROR: can't read
      "foo(1)": no such v
         ... no enclosing catch, returning TCL_ERROR
      0
      
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. priority changed to: "9 Immediate"
    6. subsystem changed to: "47. Bytecode Compiler"
    7. username: "dkf"
  3. Ticket change [d7006d5bff] (rid 123904) by msofer on 2006-03-08 16:58:59:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Note that the problem is the non-existing array, and not the
      non-existing component:
      
      % proc x {} {incr a(1)}
      % proc y {} {set a(2) 1; incr a(1)}
      % x
      can't read "a(1)": no such variable
      % y
      1
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  4. Ticket change [5ab29d979a] (rid 118187) by dkf on 2006-03-08 20:56:04:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      INST_INCR_ARRAY1 also takes the offending path in TEBC.
      
      I believe the problem is the call to TclLookupArrayElement
      at line 2433; it should create the array if it doesn't
      already exist (like 'set'). If I change the 'createArray'
      flag to '1', this problem goes away and the test suite still
      passes (with only the failures that were there before; which
      is itself an indication there's not enough tests).
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  5. Ticket change [a0afc5621d] (rid 96859) by dgp on 2006-03-08 22:25:04:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Gee... who would think
      I could miss one of the
      paths through the
      INST_INCR_* tangle?  :/
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [88a57d3854] (rid 131900) by dgp on 2006-03-08 23:07:47:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2006-03-08T16:07:47"
    3. closer changed to: "dgp"
    4. foundin changed to: "obsolete: 8.5a4"
    5. icomment:
      Logged In: YES 
      user_id=80530
      
      
      fix committed
      
      
    6. login: "dgp"
    7. mimetype: "text/plain"
    8. resolution changed to: "Fixed"
    9. status changed to: "Closed"
    10. username: "dgp"
  7. Ticket change [0e6aaebe2b] (rid 94615) by avl42 on 2006-03-09 17:34:50:

    1. icomment:
      Logged In: YES 
      user_id=830354
      
      Wow! Fixed within the third of a day!
      Thanks!
      
      
    2. login: "avl42"
    3. mimetype: "text/plain"
    4. username: "avl42"