Overview
| Artifact ID: | 5f7653bd7c6e4cd32d426eb791e08d852dd2eafebb86a2e7ad4543e859993010 |
|---|---|
| Ticket: | 1eb488b699d74e0f9d22ea5fc78aa41aa5a77a14
double free when deleting namespace containing the origin routine for some imported routine |
| User & Date: | pooryorick on 2020-08-16 14:45:03 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
In Tcl <code>-DPURIFY --enable-symbols</code> the following script results in a memory error: <code><verbatim> namespace eval test_ns_export { namespace export cmd1 proc cmd1 args {} } namespace eval test_ns_import { namespace import [namespace parent]::test_ns_export::cmd1 } proc test_ns_export::cmd1 args {} catch {namespace delete {*}[namespace children :: test_ns_export]} return success </verbatim></code> The issue is that <code>TclCreateObjCommandInNs()</code> stores in the table of routines for the namespace a pointer to the structure for the new routine, but does not increment the reference count. Eventually this results in the routine structure being freed a second second time. - 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: "- New Builtin Commands"
- title changed to:
double free when deleting namespace containing the origin routine for some imported routine
- type changed to: "Bug"