<i>Unexpected behavior / Panic / Tcl_Obj deletion management</i> status still Open with 5 other changes
by
.
D 2012-01-23T17:49:24
J icomment spoon-feeding\sthe\sissue\sto\syou:\n\nIMHO\sit's\snot\sa\sproblem\sof\s"Path\sManagement",\sbut\sa\sproblem\sof\s"Delete\sPending"\sfeature\s(so\si\smove\sthat\sagain\sin\sthe\scategory\s"10.\sObjects").\s\nAlthough\sI\shave\sfound\sit\sin\scalls\ssuch\s"file\snormalize",\sbut\sit's\spossible\sanywhere,\sif\sdelete\spending\son.\nAnd\sIMHO\smy\sattached\spath\swas\sa\sworkaround,\sthe\ssolution\swould\sbe\sa\srewriting\sof\sdelete\spending\sfunctionality:\n>\sthe\sDeletePending\smechanism\smust\sbe\schanged,\sfor\sexample\susing\s"Epoch"\sin\sObj\sstruct\s\n>\s(the\sobjects\screated\sin\sDeletePending\smode\scould\sbe\sdeleted\sdirectly\swithout\sPushObjToDelete)\s...\n>\sOr\scompletelly\sremoved\sfrom\score.\n\nI\shave\sattached\sthe\sexample\sC\scode\s(with\sexample\sTCL\scode\swithin\scomment\sbottom)\sand\sa\sready\sdll,\nwith\swhich\syou\scould\sreproduce/test\sany\stcl\sfunction\swith\sdelete\spending.\n\nNow\sspoon-feed\sthe\sproblem:\nIf\syou\swrite\sfollowing,\sit\sis\slegal\s(i\sknow\sthat\srefCount\s=\s1):\s\n\s\sTcl_Obj\s*\sobjPtr\s=\sTcl_NewObj();\n\s\sTcl_IncrRefCount(objPtr);\n\s\sTcl_AppendToObj(objPtr,\s"test",\s-1);\n\s\sTcl_AppendToObj(objPtr,\s"test2",\s-1);\nBut\sif\stomorrow\sTcl_AppendToObj\swill\sbe\smodified,\sso\sit\sattaches\sobjPtr\sto\sany\s"list",\sincrements\srefCount\sof\s"list"\sand\shereafter\sdecrements\srefCount\sof\sthis\s"list"\sagain.\nThis\smeans,\sthat\sthis\scode\swill\snot\swork\sproperly\sby\s"Delete\sPending",\scause\sthe\sdecrementing\srefCount\sof\s"list"\sdoes\snot\sdestroy\sit,\sand\srefCount\sof\sobjPtr\sremains\s2.\n
J login sebres
J mimetype text/plain
J subsystem 10.\sObjects
J username sebres
K 3475569fffffffffffffffffffffffffffffffff
U sebres
Z d7ee2d047565bcbb6334efe73175f168