Ticket UUID: | 9fd5c629c171172ffdc80e29abb2613a7d062da7 | |||
Title: | TclOO - aborts when a trace on command deletion deletes the object's namespace | |||
Type: | Bug | Version: | ||
Submitter: | pooryorick | Created on: | 2017-10-24 19:35:49 | |
Subsystem: | 35. TclOO Package | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Important | |
Status: | Closed | Last Modified: | 2017-11-01 20:25:33 | |
Resolution: | Fixed | Closed By: | pooryorick | |
Closed on: | 2017-11-01 20:25:33 | |||
Description: |
(text/x-fossil-wiki)
The following script causes Tcl to abort: <code><verbatim> oo::class create object trace add command object delete {apply {{name1 name2 action} { namespace delete [info object namespace $name1] }}} rename object {} </verbatim></code> | |||
User Comments: |
pooryorick added on 2017-10-30 05:34:08:
(text/x-fossil-wiki)
When a trace on the deletion of the command of the object explicitly deletes the namespace of the object, <code>tclOO.c/ObjectNamespaceDeleted()</code> must take care not to clean up the object itself so that <code>tclOO.c/ObjectRenamedTrace()</code> has a valid object pointer to work with. Fixed in commit bee7f97ad6521604. |