Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2017-11-01
20:25 • Ticket [9fd5c629c1] TclOO - aborts when a trace on command deletion deletes the ... artifact: c9287c913f user: pooryorick
2017-10-30
18:43 • Closed ticket [9fd5c629c1]. artifact: f4220c54c1 user: pooryorick
05:34 • Ticket [9fd5c629c1]: 3 changes artifact: 61a3db503a user: pooryorick
2017-10-24
19:35 • New ticket [9fd5c629c1]. artifact: ea747cf9fa user: pooryorick

TclOO - aborts when a trace on command deletion deletes the object's namespace

Closed / Fixed9fd5c629c171172ffdc80e29abb2613a7d062da7Created 9 years agoUpdated 9 years ago
Descriptionwiki2017-10-24 19:35:49
The following script causes Tcl to abort:

oo::class create object

trace add command object delete {apply {{name1 name2 action} {
    namespace delete [info object namespace $name1]
}}}

rename object {}
pooryorickwiki2017-10-30 05:34:08

When a trace on the deletion of the command of the object explicitly deletes the namespace of the object, tclOO.c/ObjectNamespaceDeleted() must take care not to clean up the object itself so that tclOO.c/ObjectRenamedTrace() has a valid object pointer to work with.

Fixed in commit bee7f97ad6521604.

pooryorick Closed ticket [9fd5c629c1]. [History diff]2017-10-30 18:43:40
pooryorick Ticket [9fd5c629c1]: 4 changes [History diff]2017-11-01 20:25:33
Log in (anonymous is fine) to add a comment.