.
D 2022-11-23T09:38:36.107
J icomment The\sproblem\sseems\sto\sbe,\sthat\safter\r\n\r\n\s\s\s\sobjPtr\s=\sTcl_NewStringObj(src,\slen);\r\n\s\s\s\scopy\s=\sTclNarrowToBytes(objPtr);\r\n\r\nobjPtr\sand\scopy\spoint\sto\sthe\ssame\sTcl_Obj,\sand\r\nthat\safter\sthe\sTclDecrRefCount\sin\r\n\r\n\s\s\s\ssrc\s=\s(char\s*)\sTcl_GetByteArrayFromObj(copy,\s&len);\r\n\s\s\s\sTclDecrRefCount(objPtr);\r\n\r\nalso\sthe\sobject\spointed\sto\sby\scopy\sis\scleared,\ssuch\sthat\r\nthe\sfinal\s\r\n\r\n\s\s\s\sTclDecrRefCount(copy);\r\n\r\ncauses\sthe\scrash.\sSo,\sit\slooks\sto\sme,\sthat\seither\sadding\s\r\none\sTcl_IncrRefCount()\sor\sremoving\sone\sof\sthe\sTclDecrRefCount()\r\nsolves\sthe\sissue.\sTclNarrowToBytes()\sseems\sto\sreturn\salways\r\nthe\ssame\sobject,\sor\sremoving\sthe\sfirst\sTclDecrRefCount(objPtr)\sseems\r\nok.
J login anonymous
J mimetype text/plain
K da63e4c1efcfc3e68fdc4527df6a8109e1eac348
U anonymous
Z 834c8fb3fcb694f23cc528e23cb6bc69