Manifest of check-in
[d339070a4e]
- * generic/tclUtil.c: fixed Tcl_ScanCountedElement to not step
beyond the end of the counted string [Bug: 3336]
* generic/tclCompile.c: fixed 'bad code length' error for
'expr + {[incr]}' case, with new test case [Bug: 3736]
and seg fault on 'expr + {[error]}' (different cause) that
was caused by a correct optimization that didn't correctly
track how it was modifying the source string in the opt.
The optimization was removed, which means that:
expr 1 + {[string length abc]}
will be not be compiled inline as before, but this should be
written:
expr {1 + [string length abc]}
which will be compiled inline for speed. This prevents
expr 1 + {[mindless error]}
from seg faulting, and only affects optimizations for
degenerate cases [Bug: 3737]
by
hobbs on
1999-12-08 05:49:38.
B 19ef02116305e6b0adc070baf6761e9dfdd25b35
C \t*\sgeneric/tclUtil.c:\sfixed\sTcl_ScanCountedElement\sto\snot\sstep\n\tbeyond\sthe\send\sof\sthe\scounted\sstring\s[Bug:\s3336]\n\n\t*\sgeneric/tclCompile.c:\sfixed\s'bad\scode\slength'\serror\sfor\n\t'expr\s+\s{[incr]}'\scase,\swith\snew\stest\scase\s[Bug:\s3736]\n\tand\sseg\sfault\son\s'expr\s+\s{[error]}'\s(different\scause)\sthat\n\twas\scaused\sby\sa\scorrect\soptimization\sthat\sdidn't\scorrectly\n\ttrack\show\sit\swas\smodifying\sthe\ssource\sstring\sin\sthe\sopt.\n\tThe\soptimization\swas\sremoved,\swhich\smeans\sthat:\n\t\texpr\s1\s+\s{[string\slength\sabc]}\n\twill\sbe\snot\sbe\scompiled\sinline\sas\sbefore,\sbut\sthis\sshould\sbe\n\twritten:\n\t\texpr\s{1\s+\s[string\slength\sabc]}\n\twhich\swill\sbe\scompiled\sinline\sfor\sspeed.\s\sThis\sprevents\n\t\texpr\s1\s+\s{[mindless\serror]}\n\tfrom\sseg\sfaulting,\sand\sonly\saffects\soptimizations\sfor\n\tdegenerate\scases\s[Bug:\s3737]\n
D 1999-12-08T05:49:38
F ChangeLog b0541dd2d327301d640362ff89c563712148da59
F generic/tclCompile.c 40e570f8be789edb02a6b4e423a3e8901c6d70b2
F generic/tclLoad.c ef9d60517d559ace673c7d465e357c18db4303cd
F generic/tclUtil.c 2576906ab48f4ebac2fce1ac94357d1a0a23c7a4
P 62d72d1127d4cf0b31220a54e75c266f5f262d88
U hobbs
Z 4c75bf552d3736ae8e5742988171d1df