Overview
| Artifact ID: | 8887bbfcdc96c9d9bd7e28bae9b2d0c00e8a7cd8 |
|---|---|
| Ticket: | 635200ffffffffffffffffffffffffffffffffff
string obj unicode efficiency |
| User & Date: | vincentdarley on 2002-11-07 21:51:46 |
Changes
- assignee changed to: "nijtmans"
- cmimetype changed to: "text/plain"
- comment changed to:
The following code: int len; Tcl_Obj *objPtr; objPtr = Tcl_NewObj(); Tcl_AppendToObj(objPtr, "foobar\n", 7); Tcl_GetUnicodeFromObj(objPtr, &len); Tcl_AppendToObj(objPtr, "foobar\n", 7); Tcl_GetUnicodeFromObj(objPtr, &len); Tcl_SetObjLength(objPtr, 0); Tcl_AppendToObj(objPtr, "foobar\n", 7); results in a crash because objPtr->bytes == NULL and Tcl_AppendToObj tries to copy into it. The crash occurs in AppendUtfToUtfRep here: memcpy((VOID *) (objPtr->bytes + oldLength), (VOID *) bytes, (size_t) numBytes); I don't know enough to be able to attempt to reproduce this in pure Tcl, but my implementation of tip113 ran into this problem... - foundin changed to: "obsolete: 8.4.1"
- priority changed to: "7 High"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "vincentdarley"
- subsystem changed to: "44. UTF-8 Strings"
- title changed to: "crash in string object manipulation"
- type changed to: "Bug"