Skip to content
Tcl Source Code Artifact [c1a0d1017b]
Login

Artifact [c1a0d1017b]

Artifact c1a0d1017bf3edf2877c87e8ac4d45ee91318ebf:

Ticket change [c1a0d1017b] - Ticket [3598580fffffffff|3598580fff] <i>Tcl_ListObjReplace may release deleted elements too early</i> status still Open with 4 other changes by dgp on 2012-12-29 12:57:33.
D 2012-12-29T12:57:33
J icomment Thank\syou\sfor\sthe\sdemo\sto\sclarify\smatters.\n\nIn\sthe\sdemo,\sthe\scaller\sof\sT_LOR\sappears\sto\nbe\sbuggy\sin\sits\smanagement\sof\srefcounts.\n\nIn\sthe\sdemo,\sthe\svalue\s"fgr"\scomes\sinto\sthe\ncommand\sprocedure\sof\s[crash]\swith\sa\srefcount\nof\s1,\saccounting\sfor\sthe\sreference\sthat's\sstored\sin\nthe\slist.\n\nAfter\sthe\scall\sto\sTcl_ListObjIndex()\sanother\sreference\nto\sthat\svalue\sis\sstored\sin\sobjP.\s\sTo\saccount\sfor\sthe\nsecond\sreference,\sat\sthat\spoint\sthere\sshould\sbe\sa\n\s\n\s\s\s\sTcl_IncrRefCount(objP);\n\nWith\sthat\scorrect\srefcount\smanagement\sin\splace,\sthere\nshould\sbe\sno\sissue\sleft\swith\sthe\sTcl_ListObjReplace()\nthat\swe've\sall\sbeen\susing\sa\slong\stime\snow.\n\nA\sbalancing\sTcl_DecrRefCount(objP)\sbefore\sreturning\nfrom\sthe\s[crash]\scommand\sprocedure\swould\sthen\saccount\nfor\sthat\svariable\sgoing\sout\sof\sscope.\n\nIt's\strue\sthat\sa\sbuggy\sC\scaller\scan\scrash\sthe\sprogram.\s\sThat's\nbeen\spart\sof\sthe\spower\sand\sresponsibility\sof\sC\scallers\sas\slong\nas\sI've\sused\sTcl.\s\sThe\sTcl\sC\slibrary\sfairly\sexplicit\sdoes\snot\sattempt\nto\sarmor\splate\sitself\sagainst\sbuggy\sC\scallers.\n\nUnless\sthere's\ssome\sother\snon-buggy\sdemo\sof\sthis\sissue,\sI'd\nsay\sthere's\snot\sa\sbug\shere\sin\sthe\ssense\sof\ssomething\sthat\sdemands\nto\sbe\sfixed.\s\sIf\sthat's\scorrect,\sthen\sI'd\sgo\son\sto\ssay\swe\sought\snot\nbe\smessing\swith\sthe\s8.4\sand\s8.5\simplementations\sover\sthis.\n\nThe\simprovement\sin\sadditional\ssafety\sagainst\sbuggy\sC\scallers\sis\nsomething\sI'd\sconsider\sin\s8.6\spatchlevels,\sbut\seven\sthere\sonly\nwhen\sweighed\sagainst\swhatever\snegative\simpact\smight\scome\nalong\swith\sthe\spatch.\s\sDoes\sit\ssignificantly\simpact\sperformance\s\nin\sany\sreasonable\sscenarios?\n
J login dgp
J mimetype text/plain
J username dgp
K 3598580fffffffffffffffffffffffffffffffff
U dgp
Z e2744fcc171b4180df52ca9b71793545