Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 42083508d25f1d14fd77d19b30529b0101bb96f491f60b1b0ab9e6df4e911f30
Ticket: 7842f33a5cc5eed080a57f8af9ac1e7e3cee444a
TCL crash (core)
User & Date: anonymous on 2022-08-27 21:39:42
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    The following script will CRASH tcl
    
    TWO instances are linked together, the second instance uses in the destructor the first instance. but the second instance is created in the namespace of the first instance. if the first instance is deleted the destructor of the second instance is called and this is calling the first instance again etc…
    
    
    oo::class create RpcClient {
    }
    
    oo::define RpcClient method write {name } {
      puts "RpcClient → $name"
    }
    
    oo::class create LcConfigRpcClient {
      superclass RpcClient
    }
    
    oo::define LcConfigRpcClient method LcConfigRpc_create_bug {name } {
      LcConfigRpc create $name [self] 111
    }
    oo::define LcConfigRpcClient export LcConfigRpc_create_bug
    
    
    oo::class create MkObjectRpc {
      variable hdl
    }
    
    oo::define MkObjectRpc constructor {rpcHdl mqHdl} {
      set hdl $mqHdl
      oo::objdefine [self] forward rpc $rpcHdl
    }
    
    oo::define MkObjectRpc destructor {
      my rpc write otto-$hdl
    }
    
    oo::class create LcConfigRpc {
      superclass MkObjectRpc
      variable hdl
    }
    
    set FH [LcConfigRpcClient new]
    
    $FH LcConfigRpc_create_bug cfg
    
    $FH destroy
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "cfa5542303e02522a952e7e43ae9583a052b31e9"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "10. Objects"
  15. title changed to: "TCL crash (core)"
  16. type changed to: "Bug"