Skip to content
Tcl Source Code Artifact [b9efbc1c1b]
Login

Artifact [b9efbc1c1b]

Artifact b9efbc1c1b6062b16d67f3a0a2e377eb58d45c4b:

Ticket change [b9efbc1c1b] - Ticket [3173086fffffffff|3173086fff] <i>large list segfault</i> status still Open with 4 other changes by dgp on 2011-02-11 01:56:45.
D 2011-02-11T01:56:45
J icomment \nThere's\sa\s(somewhat)\srelated\sbug\sin\sTcl_ConvertCountedElement()\nthat\scan\sonly\shit\sthose\swho\smake\suse\sof\sthe\sdocumented\sability\sto\npass\sin\sthe\sTCL_DONT_USE_BRACES\sflag.\s\sIt's\sa\sbit\smore\swork\nthan\sI\sreally\swant\sto\stake\son\sto\screate\sa\sdemo\stest/script\sbecause\nwe\sdo\snot\syet\shave\sa\stesting\scommand\sto\sexercise\sTcl_Scan*\sand\nTcl_Convert*\s.\s\sBut\sa\stext\sdesciption\sshould\sbe\sclear.\n\nThe\sproblem\sis\sthat\sTCCE\sis\susing\ssolely\sthe\sBRACES_UNMATCHED\nflag\sto\sdetermine\swhether\sor\snot\sbraces\sneed\sto\sbe\sescaped.\s\sThis\sis\nnot\sgood\senough.\s\sConsider\sthe\sexample\swhere\sthe\sstring\srep\sof\sthe\nlist\selement\sis\sthe\stwo\scharacter\ssequence\s\\{\s(\sthat\sis\sBACKSLASH\sOPENBRACE,\s\nor\s\\u005C\\u007B\s).\n\nThen\sTcl_ScanCountedElement\swill\sreturn\sback\sthe\sflags\svalue\sUSE_BRACES.\nBecause\sthe\sopen\sbrace\sis\sescaped,\sit\scontributes\sno\snesting,\sso\sthere's\sno\nproblem\sin\sthat\sstring\swith\sunmatched\sbraces.\s\sIn\sthe\susual\slist\sbuilding,\sthen,\nThe\sformatted\selement\swould\sbe\s{\\{}\s.\s\sSee\sthis\sat\swork:\n\n%\slist\s\\\\{\n{\\{}\n\nBut\sTcl_ConvertCountedElement()\sis\ssupposed\sto\ssupport\ncallers\swho\spass\sin\sTCL_DONT_USE_BRACES.\s\sWhen\sthat\nflag\sis\spassed\sin,\sthe\sformatted\selement\swould\sbe\s\\\\{\s.\s\sThe\sbackslash\ngets\spaired\swith\san\sescaping\sbackslash\sdue\sto\sthe\sflag.\s\sHowever,\nthe\sopen\sbrace\sdoes\snot\sget\sescaped\sbecuase\sTCCE\scontrols\sthat\nchoice\ssolely\swith\sthe\sBRACES_UNMATCHED\sflag,\swhich\sis\s*not*\sset.\n\nThe\sproblem\snow\sis\sthis\sresult\sfails\sto\spass\sthe\svalidity\stest\sspelled\sout\nin\sthe\scomments\sand\stested\sby\stest\sutil-3.1\sthat\swhen\sthe\sformatted\sversion\sof\na\slist\selement\sis\senclosed\sin\sbraces,\sthe\sresult\smust\sbe\sa\svalid\slist.\s\sVarious\nlist\sbuilding\sroutines\srely\son\sthis\sproperty.\s\s\s\sThe\sstring\s{\\\\{}\sis\snot\sa\svalid\sTcl\nlist.\s\sTCCE\sfails\sits\smission.\n\nThis\sis\sof\svery\slittle\simportance,\sbecuase\sonly\scallers\spassing\sthe\sTDUB\sflag\ncan\strigger\sthe\sbug,\sand\snear\sas\sI\scan\stell\sno\ssuch\screatures\sexist.\n\nHowever,\sthe\sfix\sis\sto\smake\sthe\sescaping\sof\sbraces\sby\sTCCE\shappen\nwhenever\sthe\sTDUB\sflag\sis\sset,\sno\smatter\swhether\sor\snot\sBU\sis\sset\sas\nwell.\n\nBut\sthen,\swe\sdiscover\sthat\sthe\sBU\sflag\sis\snever\sused\sfor\sanything\sanywhere,\nand\sits\sexistence\sin\sthe\sproperly\sfunctioning\scode\sis\san\sunnecessary\scomplication.\n\n
J login dgp
J mimetype text/plain
J username dgp
K 3173086fffffffffffffffffffffffffffffffff
U dgp
Z 5eb9af53f230eb319570928aefe40d83