Artifacts Associated With Ticket 218867
Ticket change [556941a838] (rid 94129) by nobody on 2000-10-26 01:06:56:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2466 Bug Version: 8.2b1 SubmitDate: '1999-07-28' LastModified: '1999-07-30' Severity: LOW Status: Released Submitter: techsupp ChangedBy: hobbs RelatedBugIDs: 2382 OS: Other Machine: NA FixedDate: '1999-07-30' FixedInVersion: 8.2b2 ClosedDate: '2000-10-25' Name: Peter Spjuth ReproducibleScript: This is a new patch to replace the broken patch in Bug 2382. My mistake with the first patch, apart from not testing it properly, was to assume that Tcl_ParseCommand always filled in parsePtr->term. In some cases it did not, so when accessing *nested.term, there was a big chance of getting a Segmentation Fault. This patch changes Tcl_ParseCommand to always fill in that value, and thus making it safe to use it in ParseTokens. This time I have tested the patch, and it gets through the test suite on both Win98 and Solaris. Patch: Index: tclParse.c =================================================================== RCS file: /cvsroot/tcl/generic/tclParse.c,v retrieving revision 1.10 diff -c -r1.10 tclParse.c *** tclParse.c1999/07/23 23:40:291.10 --- tclParse.c1999/07/27 20:24:59 *************** *** 260,265 **** --- 260,266 ---- parsePtr->tokensAvailable = NUM_STATIC_TOKENS; parsePtr->string = string; parsePtr->end = string + numBytes; + parsePtr->term = parsePtr->end; parsePtr->interp = interp; parsePtr->incomplete = 0; parsePtr->errorType = TCL_PARSE_SUCCESS; *************** *** 372,377 **** --- 373,379 ---- break; } if ((type & terminators) != 0) { + parsePtr->term = src; src++; break; } *************** *** 455,460 **** --- 457,463 ---- } if ((type & terminators) != 0) { + parsePtr->term = src; src++; break; } *************** *** 607,613 **** if (nested.tokenPtr != nested.staticTokens) { ckfree((char *) nested.tokenPtr); } ! if ((src[-1] == ']') && !nested.incomplete) { break; } if (src == parsePtr->end) { --- 610,616 ---- if (nested.tokenPtr != nested.staticTokens) { ckfree((char *) nested.tokenPtr); } ! if ((*nested.term == ']') && !nested.incomplete) { break; } if (src == parsePtr->end) { PatchFiles: tclParse.c - foundin initialized to: "obsolete: 8.2b1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "info complete (Bug 2382) again"
- type initialized to: "Bug"
Ticket change [91e683e680] (rid 120696) by welch on 2000-10-26 08:30:15:
- closedate changed to: "2000-10-26T01:30:15"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [a28ecb891a] (rid 109917) by dgp on 2001-04-18 21:52:14:
- closedate changed to: "2001-04-18T14:52:14"
- closer changed to: "dgp"
- subsystem changed to: "45. Parsing and Eval"