Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 27f96860af46ee976729b0a53ffcddb34508b319
Ticket: 736425ffffffffffffffffffffffffffffffffff
memory leaks in tclDate.c
User & Date: mistachkin on 2003-05-12 11:27:58
Changes

  1. assignee changed to: "kennykb"
  2. cmimetype changed to: "text/plain"
  3. comment changed 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 changed to: "None"
  5. priority changed to: "9 Immediate"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "mistachkin"
  9. subsystem changed to: "06. Time Measurement"
  10. title changed to: "memory leaks in tclDate.c"
  11. type changed to: "Bug"