Skip to content
Tcl Source Code Artifact [62124ce717]
Login

Artifact [62124ce717]

Artifact 62124ce7171ec0a8b6a482bcfd2484d759bc4966:

Ticket change [62124ce717] - Ticket [686782ffffffffff|686782ffff] <i>Changes to Tcl_SetObjLength() break &quot;expect -re&quot;</i> status still Open with 5 other changes by rmax on 2003-02-18 02:04:26.
D 2003-02-18T02:04:26
J icomment Logged\sIn:\sYES\s\nuser_id=124643\n\nFurther\sinvestigation\shas\sshown,\sthat\sat\sa\spoint\swhere\nexpect's\smatch\sbuffer\sstarts\sgrowing\srapidly,\sit's\sstring\nand\sunicode\srep\sget\sout\sof\ssync.\sThis\smeans,\sthe\sstring\srep\nchanges,\sbut\sthe\sunicode\srep,\sthat\sis\sused\sfor\sregexp\nmatching\sstays\sthe\ssame.\sI\shve\sinstrumented\nTcl_RegExpExecObj()\sto\sshow\sthe\sdifference:\n\n\s\s\s\sTcl_DString\sds;\n...\n\s\s\s\sTcl_DStringInit(&ds);\n\s\s\s\sTcl_UniCharToUtfDString(udata,\slength,\s&ds);\n\s\s\s\sfprintf(stderr,\s">>\sstring:\s%s\\n",\sTcl_GetString(objPtr));\n\s\s\s\sfprintf(stderr,\s">>unicode:\s%s\\n",\sTcl_DStringValue(&ds));\n\s\s\s\sTcl_DStringFree(&ds);\n\nNormally\sthe\stwo\sstrings\sprinted\sshould\salways\sbe\sthe\ssame,\nbut\safter\ssome\stime,\sthe\sunicode\srep\sseems\sto\s"freeze"\swhile\nthe\sstring\srep\skeeps\swalking\strough\sthe\sinput\swith\san\soffset\naccording\sto\sthe\sfirst\smatch\swithing\sthe\sunicode\srep.\sHere\nis\san\sexample\sof\sanother\stest\sscript\s(attached)\sat\sthe\spoint\nwhere\sit\shappens:\n\n---\shere\sit\sis\sstill\sok\s---\n>>\sstring:\sabc\ndefg\n>>unicode:\sabc\ndefg\n\n---\sand\shere\sit\shappens...\s---\n>>\sstring:\sdefg\nhijkl\n>>unicode:\sabc\ndefg\n\nFrom\sthere\son,\sthe\sunicode\srep\swill\sremain\sthe\ssame\swhile\nthe\sstring\srep\skeeps\schanging.\n\nI\ssuppose,\sthat\seither\sexpect\sdoesn't\scorrectly\sinvalidate\nthe\sunicode\srep\swhen\sit\schanges\sthe\sstring\srep,\sor\sthat\nTcl_SetObjLength()\sdoes\ssomething\swrong\swith\sthe\nrepresentations\sunder\scertain\sconditions\sthat\sare\striggered\nby\sexpect.\n\n
J login rmax
J mimetype text/plain
J title Changes\sto\sTcl_SetObjLength()\sbreak\s"expect\s-re"
J username rmax
K 686782ffffffffffffffffffffffffffffffffff
U rmax
Z bdd451de487870f745ffc9e6effa18f7