Overview
| Artifact ID: | 213df1f82e52ed9253567752d1378e5d439472c8040cfd414fa92544fcb5de75 |
|---|---|
| Ticket: | 0e4d88b6502ac8fe0ccc912c2bd2ef4c16279837
A trace deletes the namespace when a command is replaced, producing "called Tcl_CreateHashEntry on deleted table" |
| User & Date: | dgp on 2017-12-06 17:48:40 |
Changes
- icomment:
dgp line 3141 wants cmdPtr->nsPtr to not be freed. * pooryorick opens core-8-6-branch... dgp the Namespace struct does have a refCount field <pooryorick> line 3141, which file? dgp tclBasic.c <pooryorick> In Tcl_DeleteCommandFromToken? dgp heh, you've already fixed this on 8.7 ? <pooryorick> Is was thinking maybe I had. <pooryorick> But not in that function... <pooryorick> Sounds like it's just about fixed here. dgp next thing is to look at the similar patterns <pooryorick> In core-8-branch there's something similar in TclReadeObjCommandInNs, which I might have added. <pooryorick> But it's still unguarded in Tcl_DeleteCommandFromToken. dgp line 1810 is similar, also broken, but not tested? <pooryorick> 1810 is empty in my checkout, but it's in Tcl_HideCommand <pooryorick> I don't see anything in there that would decrement the namespace refCount. dgp we have delete and rename traces, but not hide traces, I guess dgp Namespace refCounts are not used in nearly as many places as I would have guessed. dgp Certainly not by everything that stores an nsPtr. dgp Only parent namespaces and ResolvedNsName intreps appear to use it.
- login: "dgp"
- mimetype: "text/plain"