|
2000-10-26
| ||
| 08:23 | • Closed ticket [218482ffff]: parser modifies strings in place and interferes with... artifact: 44e1389bb1 user: welch | |
| 01:01 | • New ticket [218482ffff]. artifact: 14e4821d1b user: nobody | |
parser modifies strings in place and interferes with literal
Closed / Fixed218482ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 01:01:06
OriginalBugID: 686 Bug Version: 8.1a2 SubmitDate: '1998-10-02' LastModified: '1998-10-02' Severity: CRIT Status: Released Submitter: stanton ChangedBy: stanton OS: All OSVersion: NA Machine: NA FixedDate: '2000-10-25' FixedInVersion: 8.1b1 ClosedDate: '1998-10-02' This bug is reproducible by running the new auto_mkindex mechanism in the Tcl library directory. The problem is that the parser modifies the string it is parsing and then restores the string when it is done. The parser also adds strings to the literal table while parsing. If it causes the literal table to expand while before it restores the string, the hash value will be incorrect and the string will be misplaced. This is a specific instance of a more general problem with code that modifies strings in place. In general strings may be cached in arbitrary ways. If a routine modifies a string in place, it must be careful to only call functions that cannot affect any other parts of the system before it restores any strings that it has modified. In this particular case, the solution is to move the code that restores the string so that it appears before any calls that affect the literal table.
welch Closed ticket [218482ffff].
[History diff]2000-10-26 08:23:17
Log in (anonymous is fine) to add a comment.