Overview
| Artifact ID: | 27f96860af46ee976729b0a53ffcddb34508b319 |
|---|---|
| Ticket: | 736425ffffffffffffffffffffffffffffffffff
memory leaks in tclDate.c |
| User & Date: | mistachkin on 2003-05-12 11:27:58 |
Changes
- assignee changed to: "kennykb"
- cmimetype changed to: "text/plain"
- 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).
- foundin changed to: "None"
- priority changed to: "9 Immediate"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "mistachkin"
- subsystem changed to: "06. Time Measurement"
- title changed to: "memory leaks in tclDate.c"
- type changed to: "Bug"