Artifact
5f7653bd7c6e4cd32d426eb791e08d852dd2eafebb86a2e7ad4543e859993010:
Ticket change
[5f7653bd7c]
- New ticket
[1eb488b699d74e0f|1eb488b699] <i>double free when deleting namespace containing the origin routine for some imported routine</i>.
by
pooryorick on
2020-08-16 14:45:03.
D 2020-08-16T14:45:03.519
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-wiki
J comment In\sTcl\s<code>-DPURIFY\s--enable-symbols</code>\sthe\sfollowing\sscript\sresults\sin\sa\r\nmemory\serror:\r\n\r\n\r\n<code><verbatim>\r\nnamespace\seval\stest_ns_export\s{\r\n\s\s\s\snamespace\sexport\scmd1\r\n\s\s\s\sproc\scmd1\sargs\s{}\r\n}\r\nnamespace\seval\stest_ns_import\s{\r\n\s\s\s\snamespace\simport\s[namespace\sparent]::test_ns_export::cmd1\r\n}\r\nproc\stest_ns_export::cmd1\sargs\s{}\r\ncatch\s{namespace\sdelete\s{*}[namespace\schildren\s::\stest_ns_export]}\r\nreturn\ssuccess\r\n</verbatim></code>\r\n\r\nThe\sissue\sis\sthat\s<code>TclCreateObjCommandInNs()</code>\sstores\sin\sthe\stable\sof\r\nroutines\sfor\sthe\snamespace\sa\spointer\sto\sthe\sstructure\sfor\sthe\snew\r\nroutine,\sbut\sdoes\snot\sincrement\sthe\sreference\scount.\s\sEventually\sthis\sresults\r\nin\sthe\sroutine\sstructure\sbeing\sfreed\sa\ssecond\ssecond\stime.
J is_private 0
J login pooryorick
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter pooryorick
J subsystem -\sNew\sBuiltin\sCommands
J title double\sfree\swhen\sdeleting\snamespace\scontaining\sthe\sorigin\sroutine\sfor\ssome\simported\sroutine
J type Bug
K 1eb488b699d74e0f9d22ea5fc78aa41aa5a77a14
U pooryorick
Z b7f1ead4816a6a7c9e3c9b016172db35