Overview
| Artifact ID: | c887514b1a0d640a868f053f716f2a6a5e89f118c8623090b8de0d82f78839c8 |
|---|---|
| Ticket: | 3422267ed6b79922ca6a69883d4e39901516443e
segmentation fault from deleting the the target of an imported alias during a trace on the target of the alias |
| User & Date: | pooryorick on 2020-08-12 12:54:58 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
The following script produces a segmentation fault in an interprter built with -DPURIFY and --enable-symobls-debug: <code><verbatim> variable res {} proc p1 args { return success } namespace eval ns1 { namespace export * } interp alias {} [namespace current]::ns1::p2 {} [namespace current]::p1 namespace eval ns2 { namespace import [namespace parent]::ns1::p2 } proc ondelete {oldname newname op} { variable res namespace delete ns1 catch { ns1::p2 } res } trace add command ns2::p2 delete [namespace which ondelete] rename ns2::p2 {} rename p1 {} </verbatim></code> The expected result is an error message about <code>ns1::p2</code> <code><verbatim> invalid command name "ns1::p2" </verbatim></code> The issue is that in <code>tclNamesp.c:DeleteImportedCmd</code>, <code>realCmdPtr</code> points to memory that has already been deallocated. For imported commands reference counting and cleanup is currently incomplete. - is_private changed to: "0"
- login: "pooryorick"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "pooryorick"
- subsystem changed to: "21. [namespace]"
- title changed to:
segmentation fault from deleting the the target of an imported alias during a trace on the target of the alias
- type changed to: "Bug"