Skip to content
Tcl Source Code History Of Ticket 875395ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 875395ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 875395ffffffffffffffffffffffffffffffffff

  1. Ticket change [999ef7f32e] (rid 110824) by vincentdarley on 2004-01-12 14:24:29:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      In 8.4.5/8.5a0 Tcl_GetIndexFromObj calls
      Tcl_GetIndexFromObjStruct which may do this:
      
      resultPtr = Tcl_GetObjResult(interp);
      Tcl_AppendStringsToObj(resultPtr,
      (numAbbrev > 1) ? "ambiguous " : "bad ", msg, " \"",
      key, "\": must be ", STRING_AT(tablePtr,offset,0),
      (char*)NULL);
      
      since Tcl_GetIndexFromObj can be called from arbitrary
      C code, there can be no assumption the interp result is
      empty/unshared, and the above code can crash (in fact
      it does crash when I use alphatk+tkdnd together).
      
      One fix is to insert:
      
      if (Tcl_IsShared(resultPtr)) {
          Tcl_Obj *copy = Tcl_DuplicateObj(resultPtr);
          Tcl_DecrRefCount(resultPtr);
          Tcl_SetObjResult(interp, copy);
          resultPtr = copy;
      }
      
      but I leave the correct fix to the maintainers.
      
      
    4. foundin initialized to: "obsolete: 8.4.5"
    5. priority initialized to: "7 High"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "vincentdarley"
    9. subsystem initialized to: "13. Index Object"
    10. title initialized to: "modifying shared object panic in tclIndexObj.c"
    11. type initialized to: "Bug"
  2. Ticket change [b4e95a3370] (rid 125132) by dkf on 2004-01-13 16:35:18:

    1. assignee changed to: "dkf"
  3. Ticket change [94834f1c69] (rid 105994) by dkf on 2004-01-13 16:47:51:

    1. closedate changed to: "2004-01-13T09:47:51"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      That's not the correct fix; the object must be fresh because
      we also have to allow for a non-empty interp result.  I
      *hate* that GetObjResult/AppendStringsToObj anti-pattern!
      
      Fixed in HEAD and 8.4
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dkf"