Artifacts Associated With Ticket 1008314fffffffffffffffffffffffffffffffff
Ticket change [1113fa0536] (rid 95079) by dgp on 2004-08-12 22:26:31:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The TclPtrSetVar() routine processes the TCL_LIST_ELEMENT flag only when the TCL_APPEND_VALUE flag is also set. This is an error that was introduced in revision 1.32 of tclVar.c. For example, Tcl_SetVar(i, "x", "a b", TCL_LIST_ELEMENT); will set the value of x to be "a b" and not "{a b}" as it should according to the docs. The public routine Tcl_SetErrorCode() can also be used to demo this bug. In particular Tcl_SetErrorCode(i, "{", NULL); will store a value in ::errorCode that is not a valid Tcl list. - foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "07. Variables"
- title initialized to: "Tcl_*SetVar* mishandle TCL_LIST_ELEMENT"
- type initialized to: "Bug"
Ticket change [6c82172294] (rid 128521) by dgp on 2004-08-13 05:59:18:
- icomment:
File Added - 97490: 1008314.patch Logged In: YES user_id=80530 The attached patch (against the HEAD) adds tests to the test suite that demo this bug.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [dd2862872b] (rid 114614) by dgp on 2004-08-13 06:12:18:
- icomment:
Logged In: YES user_id=80530 Another possible error here is that when both TCL_LIST_ELEMENT and TCL_APPEND_VALUE are set, then the Tcl_ListObjAppendElement() routine is used to do the work. Use of T_LOAE adds the constraint that the value of the variable to which we are appending must already be a valid list.. I don't think that's a documented requirement of the Tcl_*SetVar* routines. On that point, a documentation fix is probably more attractive than a code change.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [6b12ad3a18] (rid 128252) by dgp on 2004-08-13 06:57:28:
- icomment:
Logged In: YES user_id=80530 On the latter point, the T_LOAE routine has been in use for this operation since Tcl 8.0, it appears, so this change can safely be considered to be one of the Tcl 7 -> Tcl 8 incompatibilities. Only change that might be needed is improved documentation on the point.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [77e0069c92] (rid 89845) by dgp on 2004-08-13 21:21:23:
- icomment:
Logged In: YES user_id=80530 New patch includes the fixes. Please review, test, apply, and backport.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1008314.patch" [fe62cb5aca] (rid 108580) by dgp on 2004-08-13 21:21:23.
Ticket change [dc5b192776] (rid 114464) by dgp on 2004-08-13 21:21:24:
- icomment:
File Deleted - 97490: File Added - 97590: 1008314.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [8e9eccdf8f] (rid 120143) by msofer on 2004-08-14 22:20:56:
- icomment:
Logged In: YES user_id=148712 I do not understand TclseterrorcodeCmd (in the patch) very well: it passes argv[5] to Tcl_SetErrorCode() even when (argc==3). Isn't this dangerous, as in setting up a possible segfault?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [f48551ab6e] (rid 129937) by msofer on 2004-08-16 20:58:01:
- icomment:
Logged In: YES user_id=148712 From the chat: dkf "Why are you worrying about testseterrorcode? It's a testing API; it's allowed to be unsafe" dgp "TclInvokeStringCommand passes an argv of minimum length 20, so testseterrorcode should be safe. ...and argv[argc] is guaranteed to be NULL."
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [b7dbe592de] (rid 128870) by msofer on 2004-08-16 21:18:53:
- closedate changed to: "2004-08-16T14:18:53"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Applied to HEAD and core-8-4-branch
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "msofer"