Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6116c4c4fa3496bc08c193923f556ca653f8e5ce
Ticket: 3007374fffffffffffffffffffffffffffffffff
Segfault in bytecode compiled try with chained handler
User & Date: dkf on 2010-05-28 15:32:18
Changes

  1. icomment:
    Executing ByteCode 0x0x161d90, refCt 2, epoch 4, interp 0x0x807620 (epoch 4)
      Source: "\n\t\ttry {\n\t\t\treturn [list foo2 bar2]\n\t\t} on return {res} - on"
      Cmds 5, src 144, inst 160, litObjs 9, aux 0, stkDepth 5, code/src 2.92
      Code 420 = header 104+inst 160+litObj 36+exc 84+aux 0+cmdMap 28
      Proc 0x0x1667d0, refCt 2, args 0, compiled locals 3
      Starting stack top=0
     1:  0 (0) beginCatch4 0 
     1:  0 (0) beginCatch4 0 => catchTop=0, stackTop=0
     1:  0 (5) startCommand +29 2 # next cmd at pc 34, 2 cmds start here
     1:  0 (14) push1 0 # "foo2"
     1:  1 (14) push1 0 => "foo2"
     1:  1 (16) push1 1 # "bar2"
     1:  2 (16) push1 1 => "bar2"
     1:  2 (18) list 2 
     1:  2 (18) list 2 => "foo2 bar2"
     1:  1 (23) push1 2 # ""
     1:  2 (23) push1 2 => ""
     1:  2 (25) returnImm +0 1 
     1:  2 (25) returnImm 0 1 =>  1:  2 (25) returnImm => TCL_RETURN, result= "foo2 bar2"
      ... found catch at 5, catchTop=0, unwound to 0, new pc 43
     1:  0 (43) pushReturnCode 
     1:  0 (43) pushReturnCode => 2
     1:  1 (44) pushResult 
     1:  1 (44) pushResult => "foo2 bar2"
     1:  2 (45) pushReturnOpts 
     1:  2 (45) pushReturnOpts => "-code 0 -level 1"
     1:  3 (46) endCatch 
     1:  3 (46) endCatch => catchTop=-1
     1:  3 (47) storeScalar1 %v2 # temp var 2
     1:  3 (47) storeScalar1 2 <- "-code 0 -level 1" => -code 0 -level 1
     1:  3 (49) pop 
     1:  3 (49) pop => discarding "-code 0 -level 1"
     1:  2 (50) storeScalar1 %v1 # temp var 1
     1:  2 (50) storeScalar1 1 <- "foo2 bar2" => foo2 bar2
     1:  2 (52) pop 
     1:  2 (52) pop => discarding "foo2 bar2"
     1:  1 (53) dup 
     1:  1 (53) dup => "2"
     1:  2 (54) push1 4 # "2"
     1:  3 (54) push1 4 => "2"
     1:  3 (56) eq 
     1:  2 (57) jumpFalse4 +34 # pc 91
     1:  2 (57) jumpFalse4 34 => 1 true
     1:  1 (62) beginCatch4 1 
     1:  1 (62) beginCatch4 1 => catchTop=0, stackTop=1
     1:  1 (67) loadScalar1 %v1 # temp var 1
     1:  1 (67) loadScalar1 1 => foo2 bar2
     1:  2 (69) storeScalar1 %v0 # var "res"
     1:  2 (69) storeScalar1 0 <- "foo2 bar2" => foo2 bar2
     1:  2 (71) pop 
     1:  2 (71) pop => discarding "foo2 bar2"
     1:  1 (72) jump4 +40 # pc 112
     1:  1 (72) jump4 40 => new pc 112
     1:  1 (112) beginCatch4 2 
     1:  1 (112) beginCatch4 2 => catchTop=1, stackTop=1
     1:  1 (117) push1 5 # "puts"
     1:  2 (117) push1 5 => "puts"
     1:  2 (119) push1 6 # "2 Result ok: ("
     1:  3 (119) push1 6 => "2 Result ok: ("
     1:  3 (121) loadScalar1 %v0 # var "res"
     1:  3 (121) loadScalar1 0 => foo2 bar2
     1:  4 (123) push1 7 # ")"
     1:  5 (123) push1 7 => ")"
     1:  5 (125) concat1 3 
     1:  5 (125) concat1 3 => "2 Result ok: (foo2 bar2)"
     1:  3 (127) invokeStk1 2 
     1:  3 (127) invokeStk1 2 => call "puts" "2 Result ok: (f" 
    2 Result ok: (foo2 bar2)
     1:  3 (129) pushReturnOpts 2 => ... after "puts": TCL_OK, result=""
     1:  2 (129) pushReturnOpts 
     1:  2 (129) pushReturnOpts => "-code 0 -level 0"
     1:  3 (130) reverse 2 
     1:  3 (135) jump1 +4 # pc 139
     1:  3 (135) jump1 4 => new pc 139
     1:  3 (139) endCatch 
     1:  3 (139) endCatch => catchTop=0
     1:  3 (140) storeScalar1 %v1 # temp var 1
     1:  3 (140) storeScalar1 1 <- "" => 
     1:  3 (142) pop 
     1:  3 (142) pop => discarding ""
     1:  2 (143) storeScalar1 %v2 # temp var 2
     1:  2 (143) storeScalar1 2 <- "-code 0 -level 0" => -code 0 -level 0
     1:  2 (145) pop 
     1:  2 (145) pop => discarding "-code 0 -level 0"
     1:  1 (146) pop 
    
    Program received signal EXC_BAD_ACCESS, Could not access memory.
    
    
    
  2. login: "dkf"
  3. mimetype: "text/plain"
  4. username: "dkf"