Skip to content
Tcl Source Code History Of Ticket 473875ffffffffff
Login

History Of Ticket 473875ffffffffff

Artifacts Associated With Ticket 473875ffffffffff

  1. Ticket change [804aa0b9a5] (rid 116848) by nobody on 2001-10-23 02:20:25:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Tk_GetCursorFromData() does not initialize nextPtr
      field to NULL when allocating a new Tk_Cursor object.
      If the allocated memory is not automatically 
      initialized, it'll cause a problem later when 
      another cursor is allocated from the same data
      after this cursor is destroyed. I.e.:
      
      a = Tk_GetCursorFromData(...);
      ...
      Tk_FreeCursor(a);
      ...
      /* b is allocated using the same setup as a */
      b = Tk_GetCursorFromData(...); /* seg fault */
      
      This was found with hiertable in blt2.4u.
      
      Solution: apply the following patch to generic/tkCursor.c:
      
      --- tkCursor.c.oldMon Oct 22 19:16:41 2001
      +++ tkCursor.cMon Oct 22 18:57:37 2001
      @@ -384,6 +384,8 @@
           cursorPtr->objRefCount = 0;
           cursorPtr->idHashPtr = Tcl_CreateHashEntry(&dispPtr->cursorIdTable, 
                   (char *) cursorPtr->cursor, &new);
      +    /* XXX Set nextPtr to NULL ! */
      +    cursorPtr->nextPtr = NULL;
       
           if (!new) {
       panic("cursor already registered in Tk_GetCursorFromData");
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "None"
    10. title initialized to: "nextPtr init in Tk_GetCursorFromData()"
    11. type initialized to: "Patch"
  2. Ticket change [8f9ae86a8c] (rid 120307) by dkf on 2001-10-23 15:53:53:

    1. assignee changed to: "dkf"
    2. closedate changed to: "2001-10-23T08:53:53"
    3. closer changed to: "dkf"
    4. icomment:
      Logged In: YES 
      user_id=79902
      
      This is a Tk patch, not a Tcl patch.  (I've applied it to Tk
      too.)
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"
    9. username: "dkf"