Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 41d61021282c3cab5b1bd238beed1735d3420f06
Ticket: 3154ea27591de16257a7b8b8d361514b004e527f
Repeat catch six times and get core dump
User & Date: anonymous on 2016-05-04 14:12:05
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Here is the code:
    
        proc __BEGIN {} {
        ::tcl::unsupported::assemble {
            beginCatch @badLabel
            push error
            push testing
            invokeStk 2
            pop
            push 0
            jump @okLabel
            label @badLabel
            push 1; # should be pushReturnCode
            label @okLabel
            endCatch
            pop
    
            beginCatch @badLabel2
            push error
            push testing
            invokeStk 2
            pop
            push 0
            jump @okLabel2
            label @badLabel2
            push 1; # should be pushReturnCode
            label @okLabel2
            endCatch
            pop
    
            beginCatch @badLabel3
            push error
            push testing
            invokeStk 2
            pop
            push 0
            jump @okLabel3
            label @badLabel3
            push 1; # should be pushReturnCode
            label @okLabel3
            endCatch
            pop
    
            beginCatch @badLabel4
            push error
            push testing
            invokeStk 2
            pop
            push 0
            jump @okLabel4
            label @badLabel4
            push 1; # should be pushReturnCode
            label @okLabel4
            endCatch
            pop
    
            beginCatch @badLabel5
            push error
            push testing
            invokeStk 2
            pop
            push 0
            jump @okLabel5
            label @badLabel5
            push 1; # should be pushReturnCode
            label @okLabel5
            endCatch
            pop
    
            beginCatch @badLabel6
            push error
            push testing
            invokeStk 2
            pop
            push 0
            jump @okLabel6
            label @badLabel6
            push 1; # should be pushReturnCode
            label @okLabel6
            endCatch
            pop
        }}
        __BEGIN
    
    When I run this code, I get core dump:
    
        $ ~/tcl8.6.5/bin/tclsh8.6 /tmp/add.tcl
        alloc: invalid block: 0xb2dde0: 77 0
        Aborted (core dumped)
    
    If the number of beginCatch/endCatch pairs is less than 6, the program succeeds.
    
  5. foundin changed to: "8.6.5"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "1fa85a7a8cf201549ab887413ec59508d86baa00"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "47. Bytecode Compiler"
  15. title changed to: "Repeat catch six times and get core dump"
  16. type changed to: "Bug"