Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3a83b050215e68804263515b0ea22e839ac873728d1f6a2221efa5c891849dc1
Ticket: 37efead06408d9aedd46d0e7f3eeb5910470e65e
Segfault in TclOO destructor
User & Date: cyan on 2021-02-15 11:52:51
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Reproducible segfault in TclOO destructor, when the object namespace delete triggers the destruction of child object instances which call back to the parent object (which still exists, but has lost its namespace):
    
    oo::class create foo {
    	variable nameseq
    
    	method bar {} {
    		bar create bar[incr nameseq] [self]
    	}
    
    	method baz {} {}
    }
    
    oo::class create bar {
    	variable parent
    
    	constructor a_parent {
    		set parent $a_parent
    	}
    
    	destructor {
    		$parent baz
    	}
    }
    
    foo create f
    f bar
    f destroy
    
    Affects all versions of TclOO I've tried (including latest core-8-branch from fossil)
    
  5. foundin changed to: "8.6.*, 8.7"
  6. is_private changed to: "0"
  7. login: "cyan"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "54152f94cb1628c0c148b4b5708ace53216227b0"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "cyan"
  14. subsystem changed to: "35. TclOO Package"
  15. title changed to: "Segfault in TclOO destructor"
  16. type changed to: "Bug"