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

History Of Ticket 969358ffffffffff

Artifacts Associated With Ticket 969358ffffffffff

  1. Ticket change [7104ccd236] (rid 100596) by jiangwu on 2004-06-09 04:01:15:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      After setting the -maxundo option in the text widget, a 
      memory violation happens when number of undo 
      operations exceeds this maximum bound.
      
      Using tcl 8.4.6 with memory debugging on, do this:
      
      text .t -undo 1 -autoseparator 1 -maxundo 2
      pack .t -expand 1 -fill both
      .t insert end <some block of text>
      
      1. select a portion of the text and do "Control-X"
      2. do "Control-V" to paste back.
      3. select another block of text an do "Control-X", the 
      program crashes.
      
      The bug is in tkUndo.c, line 205.  The loop to free undo 
      element is incorrect.  Patch to fix is this:
      
      Index: generic/tkUndo.c
      ==========================================
      =========================
      RCS 
      file: /home/cvs/starvine/cvsroot/tk/generic/tkUndo.c,v
      retrieving revision 1.3
      diff -u -r1.3 tkUndo.c
      --- generic/tkUndo.c    9 Mar 2004 08:23:25 -0000       
      1.3
      +++ generic/tkUndo.c    9 Jun 2004 03:52:01 -0000
      @@ -205,7 +205,7 @@
               while ( elem ) {
                  prevelem = elem;
                  elem = elem->next;
      -           ckfree((char *) elem);
      +           ckfree((char *) prevelem);
               }
               stack->depth = stack->maxdepth;
           }
      
      
    4. foundin initialized to: "obsolete: 8.4.6"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "jiangwu"
    9. subsystem initialized to: "41. Memory Allocation"
    10. title initialized to: "Using -maxundo causes segfault in Text widget"
    11. type initialized to: "Bug"
  2. Ticket change [6a35f56913] (rid 128105) by dkf on 2004-06-10 02:20:27:

    1. resolution changed to: "Fixed"
  3. Ticket change [fbe913c3bd] (rid 108141) by dkf on 2004-06-10 02:20:28:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Thanks for spotting this.  Fixed in HEAD (though we could
      also do with a test, not that I could exhibit the bug in the
      first place due to memory manager differences; purifying
      would have caught this if it was triggered).  Backport to
      8.4 branch required.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  4. Ticket change [2390bf6c38] (rid 130962) by dkf on 2004-06-10 02:20:54:

    1. priority changed to: "9 Immediate"
  5. Ticket change [d929752d18] (rid 107559) by hobbs on 2004-07-15 02:08:26:

    1. closedate changed to: "2004-07-14T19:08:26"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      backported for 8.4.7.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "hobbs"