Skip to content
Tcl Source Code Artifact [a4f5d36e7f]
Login

Artifact [a4f5d36e7f]

Artifact a4f5d36e7fbb4d3dd68b3001c6f7285424aac890:

Ticket change [a4f5d36e7f] - Ticket [3598580fffffffff|3598580fff] <i>Tcl_ListObjReplace may release deleted elements too early</i> status still Open with 4 other changes by nijtmans on 2012-12-29 16:29:08.
D 2012-12-29T16:29:08
J icomment Let\sme\srespectfully\sdisagree\swith\syour\sdiagnostics\sthat\nthere\sis\sno\sbug\shere.\sThe\sTcl_ListObjReplace\sis\sexpected\nto\sbe\sfire-and-forget:\swhen\sthe\sobjP\sobject\sis\snot\nTcl_IncRefCount'ed\smeans\sthat\safter\sthe\nTcl_ListObjReplace\scall\sthis\sobject\sis\sno\slonger\nused\sby\sthe\scaller.\sIn\sthis\scase,\sthat's\strue,\nso\sthe\scaller\sshould\snot\sneed\sto\sincrement\sthe\nrefCount.\sYes,\sthe\sexample\scode\sis\nmeaningless,\sbut\svalid.\sFrom\sthe\sdocumentation\ncannot\sbe\sderived\sthat\sthe\srefcount\sshould\nbe\sincremented\sbefore\sthe\sTcl_ListObjReplace\ncall,\sand\sdecremented\simmediately\safter.\n\nThe\sonly\sthing\smy\spatch\sdoes\sis\sdo\sthe\nincrement\sbefore\sthe\sdecrement,\sas\ssuggested\nby\sAshok,\snothing\selse\schanged.\sI\snow\scorrected\nthe\sescape\spath\sas\swell,\srestoring\sthe\nrefcounts\sas\sthey\swere.\n\nExtreme\scare\sshould\sbe\staken\sdoing\nthis\sin\sany\s8.x\sreleases,\sbut\swith\s4\spair\sof\neyes\sfocussed\son\sthis\sbug\sand\sall\nexisting\stest-cases\sas\sback-up,\sI\sthink\nthis\schange\sshould\sbe\sfine.\n\nI\sam\strying\sto\sturn\sthis\sinto\sa\stest-case\nfor\sthe\stest\ssuite,\sbut\sthat's\snot\nfinished\syet.\n
J login nijtmans
J mimetype text/plain
J username nijtmans
K 3598580fffffffffffffffffffffffffffffffff
U nijtmans
Z 6e1a9741f7723ee335273816b2b18895