Artifacts Associated With Ticket 1445454
Ticket change [7b649278e6] (rid 90506) by avl42 on 2006-03-08 08:30:51:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- 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) - foundin initialized to: "obsolete: 8.5a3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "avl42"
- subsystem initialized to: "17. Commands I-L"
- title initialized to: "incr on undefined array fails in procedures"
- type initialized to: "Bug"
Ticket change [abe67a6bc1] (rid 101198) by dkf on 2006-03-08 16:02:48:
- assignee changed to: "msofer"
- 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 - login: "dkf"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- subsystem changed to: "47. Bytecode Compiler"
- username: "dkf"
Ticket change [d7006d5bff] (rid 123904) by msofer on 2006-03-08 16:58:59:
- 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 - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [5ab29d979a] (rid 118187) by dkf on 2006-03-08 20:56:04:
- 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).
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [a0afc5621d] (rid 96859) by dgp on 2006-03-08 22:25:04:
- icomment:
Logged In: YES user_id=80530 Gee... who would think I could miss one of the paths through the INST_INCR_* tangle? :/
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [88a57d3854] (rid 131900) by dgp on 2006-03-08 23:07:47:
- assignee changed to: "dgp"
- closedate changed to: "2006-03-08T16:07:47"
- closer changed to: "dgp"
- foundin changed to: "obsolete: 8.5a4"
- icomment:
Logged In: YES user_id=80530 fix committed
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
Ticket change [0e6aaebe2b] (rid 94615) by avl42 on 2006-03-09 17:34:50:
- icomment:
Logged In: YES user_id=830354 Wow! Fixed within the third of a day! Thanks!
- login: "avl42"
- mimetype: "text/plain"
- username: "avl42"
- icomment: