Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 754247019674f3d9c5b48aed4bebc4bfada16cc7
Ticket: 1903325fffffffffffffffffffffffffffffffff
puts causes bytecode crash after dict operation
User & Date: dkf on 2008-03-16 22:54:20
Changes

  1. icomment:
    Logged In: YES 
    user_id=79902
    Originator: NO
    
    Further investigation gives this trace...
    
    % set tcl_traceExec 3; xx $d b -dictionary
    1: (15) invoking "xx" "0 {a 1 b test c" "b" "-dictionary"
    Calling proc "xx" "0 {a 1 b test c" "b" "-dictionary"
    
    Executing ByteCode 0x00A22E88, refCt 2, epoch 3, interp 0x003DA5C0 (epoch 3)
      Source: "\ndict for {id subdict} $idict {\n}\nputs \"key=$key $args\"\n"
      Cmds 2, src 56, inst 89, litObjs 5, aux 0, stkDepth 3, code/src 5.14
      Code 288 = header 104+inst 89+litObj 20+exc 56+aux 0+cmdMap 8
      Proc 0x00A40040, refCt 2, args 3, compiled locals 6
      Starting stack top=0
     2:  0 (0) loadScalar1 %v0      # var "idict"
     2:  0 (0) loadScalar1 0 => 0 {a 1 b test c abc}
     2:  1 (2) dictFirst %v5        # temp var 5
     2:  1 (2) dictFirst 5 => "a 1 b test c abc" "0" 0 2:  3 (7) jumpTrue4 +57
    # pc 64
     2:  3 (7) jumpTrue4 5 => 0 false
     2:  2 (12) beginCatch4 0
     2:  2 (12) beginCatch4 0 => catchTop=0, stackTop=2
     2:  2 (17) storeScalar4 %v3    # var "id"
     2:  2 (17) storeScalar4 3 <- "0" => 0
     2:  2 (22) pop
     2:  2 (22) pop => discarding "0"
     2:  1 (23) storeScalar4 %v4    # var "subdict"
     2:  1 (23) storeScalar4 4 <- "a 1 b test c abc" => a 1 b test c abc
     2:  1 (28) pop
     2:  1 (28) pop => discarding "a 1 b test c abc"
     2:  0 (29) push1 0     # ""
     2:  1 (29) push1 0 => ""
     2:  1 (31) pop
     2:  1 (31) pop => discarding ""
     2:  0 (32) dictNext %v5        # temp var 5
     2:  0 (32) dictNext 5 => "" "" 1 2:  3 (37) jumpFalse4 -20     # pc 17
     2:  3 (37) jumpFalse4 -20 => 1 true
     2:  2 (42) pop
     2:  2 (42) pop => discarding ""
     2:  1 (43) pop
     2:  1 (43) pop => discarding ""
     2:  0 (44) dictDone %v5        # temp var 5
     2:  0 (44) dictDone 5 =>  2:  0 (49) endCatch
     2:  0 (49) endCatch => catchTop=-1
     2:  0 (50) jump4 +21   # pc 71
     2:  0 (50) jump4 21 => new pc 71
     2:  0 (71) push1 1     # ""
     2:  1 (71) push1 1 => ""
     2:  1 (73) pop
     2:  1 (73) pop => discarding ""
     2:  0 (74) push1 2     # "puts"
     2:  1 (74) push1 2 => "puts"
     2:  1 (76) push1 3     # "key="
     2:  2 (76) push1 3 => "key="
     2:  2 (78) loadScalar1 %v1     # var "key"
     2:  2 (78) loadScalar1 1 => b
     2:  3 (80) push1 4     # " "
     2:  4 (80) push1 4 => " "
    
    Bad stack top 4 at pc 82 in TclExecuteByteCode (min 0, max 3)
     executing puts "key=$key $args"
    TclExecuteByteCode execution failure: bad stack top
    
    
  2. login: "dkf"
  3. mimetype: "text/plain"
  4. username: "dkf"