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

History Of Ticket 736425ffffffffff

Artifacts Associated With Ticket 736425ffffffffff

  1. Ticket change [27f96860af] (rid 88619) by mistachkin on 2003-05-12 11:27:58:

    1. assignee initialized to: "kennykb"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      generic/tclDate.c
      
      1. Shouldn't this file be using ckalloc/ckrealloc? 
      2. The following variables are allocated and are 
      never freed: 
      
      int *TclDates; 
      YYSTYPE *TclDatev; 
      
      -----
      
      It appears that we can override the use of 
      malloc/realloc by defining the YYEXPAND 
      preprocessor macro and having it call a function 
      which does ckalloc/ckrealloc instead.
      
      As for the leak, I think since the only memory that 
      is allocated by this file is the two static variables 
      above, a finalization routine is in order.  This 
      should be a fairly trivial fix.
      
      I have attached a preliminary fix for these two 
      issues (this is not a patch, it's just some code to 
      cut and paste into tclDate.c/tclGetDate.y).
      
      I'm willing to learn yacc to assist if necessary.
      
      As a "next gen" solution to this problem, I 
      suggested to dkf that we parse the dates using Tcl 
      code that is evaluated when necessary (since yacc 
      appears to be rather wild).
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "9 Immediate"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "mistachkin"
    9. subsystem initialized to: "06. Time Measurement"
    10. title initialized to: "memory leaks in tclDate.c"
    11. type initialized to: "Bug"
  2. Ticket change [085ec3b1b2] (rid 89551) by mistachkin on 2003-05-12 18:27:58:

    1. icomment:
      
      
      File Added - 50173: datefix.c
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  3. Add attachment "datefix.c" [b8a56e17ca] (rid 128997) by mistachkin on 2003-05-12 18:27:58.

  4. Ticket change [207448791c] (rid 91310) by hobbs on 2003-05-14 06:03:07:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      No finalization is necessary because those two are statics, 
      and I don't think anyone has ever changed that behavior.  The 
      point is that this is all yacc, and thus we have to work with 
      what yacc gives us.  It may be necessary to change the 
      YYEXPAND, but I don't know of any problems that have 
      arisen from this.  The "leak" is a red herring because that is a 
      never-used code path.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. priority changed to: "5 Medium"
    5. username: "hobbs"
  5. Ticket change [9e31ca17ab] (rid 96438) by mistachkin on 2003-05-14 10:15:44:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      I already have some code that will fix these problems.  
      Does anybody have a test case I can use to test it with 
      (something that forces it to call malloc/realloc)?
      Also, what version of yacc is required and what is the 
      proper invocation of the command to process 
      tclGetDate.y ?
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  6. Ticket change [04a6cc2cf2] (rid 120039) by kennykb on 2003-05-19 02:40:11:

    1. closedate changed to: "2003-05-18T19:40:11"
    2. closer changed to: "kennykb"
    3. icomment:
      Logged In: YES 
      user_id=99768
      
      Original poster confirms that the memory leak is resolved.
      
      
    4. login: "kennykb"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "kennykb"