Skip to content
Tcl Source Code History Of Ticket 3202905fffffffffffffffffffffffffffffffff
Login

History Of Ticket 3202905fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 3202905fffffffffffffffffffffffffffffffff

  1. Ticket change [61d36479b3] (rid 92315) by cjmcdonald on 2011-03-08 11:43:46:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      There is a problem with obj results returned from an
      interpreter. When the obj result is reset, a tclStringType
      internal rep can be left for an empty string.  This then
      gives inconsistent results for a new obj result.
      
      The attached example program objresult_example.c
      demonstrates the issue.
      
      The problem is in ResetObjResult in tclResult.c, where it is
      assumed that the obj result only needs to be reset if it is
      not an empty string. Changing this so that is always clears
      any internal rep fixes the problem.
      
      This patch is against the 8.5.9 release:
      
      *** tclResult.c.859     Wed Mar 24 15:31:48 2010
      --- tclResult.c Tue Mar  8 11:21:20 2011
      ***************
      *** 961,972 ****
              TclNewObj(objResultPtr);
              Tcl_IncrRefCount(objResultPtr);
              iPtr->objResultPtr = objResultPtr;
      !     } else if (objResultPtr->bytes != tclEmptyStringRep) {
      !       if (objResultPtr->bytes != NULL) {
      !           ckfree((char *) objResultPtr->bytes);
              }
      -       objResultPtr->bytes = tclEmptyStringRep;
      -       objResultPtr->length = 0;
              TclFreeIntRep(objResultPtr);
              objResultPtr->typePtr = NULL;
            }
      --- 961,974 ----
              TclNewObj(objResultPtr);
              Tcl_IncrRefCount(objResultPtr);
              iPtr->objResultPtr = objResultPtr;
      !     } else {
      !       if (objResultPtr->bytes != tclEmptyStringRep) {
      !           if (objResultPtr->bytes != NULL) {
      !               ckfree((char *) objResultPtr->bytes);
      !           }
      !           objResultPtr->bytes = tclEmptyStringRep;
      !           objResultPtr->length = 0;
              }
              TclFreeIntRep(objResultPtr);
              objResultPtr->typePtr = NULL;
            }
      
      
    4. foundin initialized to: "obsolete: 8.5.9"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "cjmcdonald"
    10. subsystem initialized to: "45. Parsing and Eval"
    11. title initialized to: "Incorrect Tcl Interpreter Obj Result"
    12. type initialized to: "Bug"
  2. Add attachment "objresult_example.c" [dc92918cdc] (rid 114505) by cjmcdonald on 2011-03-08 18:43:46.

  3. Ticket change [87380fba44] (rid 131659) by cjmcdonald on 2011-03-08 18:43:46:

    1. icomment:
      
      
      File Added - 403697: objresult_example.c
      
      
      
    2. login: "cjmcdonald"
    3. mimetype: "text/plain"
    4. username: "cjmcdonald"
  4. Ticket change [8c6c90ad10] (rid 127743) by msofer on 2011-03-08 18:45:52:

    1. assignee changed to: "dgp"
  5. Ticket change [3e0cc7fde7] (rid 121195) by dgp on 2011-03-08 21:54:01:

    1. assignee changed to: "msofer"
    2. icomment:
      Bug introduced in checkin a9ae49ef27 2007-11-10
      
      Bad miguel!
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  6. Ticket change [76d4f21e33] (rid 105650) by dgp on 2011-03-08 22:25:53:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2011-03-08T15:25:53"
    3. closer changed to: "dgp"
    4. icomment:
      
      
      allow_comments - 1
      
      fixed in all open branches.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "dgp"