Overview
| Artifact ID: | 556941a83832a1b6b0ba79e923b108863adeb797 |
|---|---|
| Ticket: | 218867ffffffffffffffffffffffffffffffffff
info complete (Bug 2382) again |
| User & Date: | nobody on 2000-10-26 01:06:56 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.2b1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "info complete (Bug 2382) again"
- type changed to: "Bug"