Skip to content
Tcl Source Code History Of Ticket 736421ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 736421ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 736421ffffffffffffffffffffffffffffffffff

  1. Ticket change [639e673dd1] (rid 92610) by mistachkin on 2003-05-12 11:18:11:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      generic/tclEnv.c, line #418:
      
      string = ckrealloc(string, (unsigned) 
      (Tcl_DStringLength(&envString)+1));
      
      This is a local variable which has memory allocated 
      to it and the memory is never freed.  This is a 
      repeatable leak.
      
      
    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: "08. Environment Variables"
    10. title initialized to: "memory leak in TclUnsetEnv"
    11. type initialized to: "Bug"
  2. Ticket change [88f2bf7ced] (rid 131945) by hobbs on 2003-05-14 06:09:55:

    1. assignee changed to: "davygrvy"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      There is a ifdef HAVE_PUTENV_THAT_COPIES that I 
      thought addressed this.  How can I exercise this bug in a 
      script?
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. priority changed to: "7 High"
    6. username: "hobbs"
  3. Ticket change [931ec256a8] (rid 105761) by davygrvy on 2003-05-14 07:07:21:

    1. closedate changed to: "2003-05-14T00:07:21"
    2. closer changed to: "davygrvy"
    3. icomment:
      Logged In: YES 
      user_id=7549
      
      Yet another tclEnv issue.
      
      
      Index: tclEnv.c
      =============================================
      ======================
      RCS file: /cvsroot/tcl/tcl/generic/tclEnv.c,v
      retrieving revision 1.20
      diff -c -r1.20 tclEnv.c
      *** tclEnv.c14 Jan 2003 02:06:11 -00001.20
      --- tclEnv.c14 May 2003 00:05:22 -0000
      ***************
      *** 429,434 ****
      --- 429,439 ----
        
            if (environ[index] == string) {
        ReplaceString(oldValue, string);
      + #ifdef HAVE_PUTENV_THAT_COPIES
      +     } else {
      + /* This putenv() copies instead of taking ownership 
      */
      + ckfree(p);
      + #endif
            }
        #else
            for (envPtr = environ+index+1; ; envPtr++) {
      
      
      Untested..  Need exercising script.
      
      
    4. login: "davygrvy"
    5. mimetype: "text/plain"
    6. status changed to: "Pending"
    7. username: "davygrvy"
  4. Ticket change [3b55ddde89] (rid 112722) by mistachkin on 2003-05-14 10:17:36:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      This bug may be observed on Windows by running the 
      test suite in tclsh with memory debuggin enabled.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. status changed to: "Open"
    5. username: "mistachkin"
  5. Ticket change [e20e3abcd7] (rid 87550) by mistachkin on 2003-05-14 10:23:50:

    1. icomment:
      
      
      File Added - 50294: memory.leak
      
      Logged In: YES 
      user_id=113501
      
      Ok, here are the exact steps I use to duplicate this leak:
      
      tclsh85tg
      % memory onexit <your leak file here>
      % rename exit ""
      % package require tcltest
      % source env.test
      % close stdin
      
      NOTE: You can do the "source env.test" several times for 
      dramatic effect.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "mistachkin"
  6. Add attachment "memory.leak" [ed5de9d815] (rid 103865) by mistachkin on 2003-05-14 10:23:50.

  7. Ticket change [c948bfe7d8] (rid 122255) by mistachkin on 2003-05-14 11:05:22:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      Simplified test case:
      
      foreach name [array names env] { set env2($name) $env
      ($name); unset env($name) }
      
      Produces the following leaks (will be different on your 
      machine):
      
        a76328 -   a7633d       22 @ ..\generic\tclEnv.c 418 
        a724a0 -   a724a4        5 @ ..\generic\tclEnv.c 418 
        a72420 -   a72427        8 @ ..\generic\tclEnv.c 418 
        a762a8 -   a762b4       13 @ ..\generic\tclEnv.c 418 
        a723e0 -   a723e9       10 @ ..\generic\tclEnv.c 418 
        a72320 -   a72328        9 @ ..\generic\tclEnv.c 418 
        a723a0 -   a723a5        6 @ ..\generic\tclEnv.c 418 
        a72360 -   a72365        6 @ ..\generic\tclEnv.c 418 
        a722e0 -   a722e7        8 @ ..\generic\tclEnv.c 418 
        a72260 -   a7226a       11 @ ..\generic\tclEnv.c 418 
        a722a0 -   a722a3        4 @ ..\generic\tclEnv.c 418 
        a76228 -   a7623f       24 @ ..\generic\tclEnv.c 418 
        a721e0 -   a721e7        8 @ ..\generic\tclEnv.c 418 
        a76128 -   a76133       12 @ ..\generic\tclEnv.c 418 
        a76028 -   a76033       12 @ ..\generic\tclEnv.c 418 
        a72220 -   a72224        5 @ ..\generic\tclEnv.c 418 
        a721a0 -   a721a8        9 @ ..\generic\tclEnv.c 418 
        a760a8 -   a760b5       14 @ ..\generic\tclEnv.c 418 
        a75ea8 -   a75eb3       12 @ ..\generic\tclEnv.c 418 
        a72160 -   a72169       10 @ ..\generic\tclEnv.c 418 
        a75fa8 -   a75fb4       13 @ ..\generic\tclEnv.c 418 
        a75f28 -   a75f38       17 @ ..\generic\tclEnv.c 418 
        a75e28 -   a75e33       12 @ ..\generic\tclEnv.c 418 
        a75da8 -   a75db4       13 @ ..\generic\tclEnv.c 418 
        a72120 -   a72128        9 @ ..\generic\tclEnv.c 418 
        a75d28 -   a75d3b       20 @ ..\generic\tclEnv.c 418 
        a720e0 -   a720e9       10 @ ..\generic\tclEnv.c 418 
        a720a0 -   a720a8        9 @ ..\generic\tclEnv.c 418 
        a72060 -   a7206a       11 @ ..\generic\tclEnv.c 418 
        a75ca8 -   a75cba       19 @ ..\generic\tclEnv.c 418 
        a72020 -   a72028        9 @ ..\generic\tclEnv.c 418 
        a75c28 -   a75c3d       22 @ ..\generic\tclEnv.c 418 
        a71fa0 -   a71fa7        8 @ ..\generic\tclEnv.c 418 
        a71fe0 -   a71fe5        6 @ ..\generic\tclEnv.c 418 
      
      
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  8. Add attachment "env.diff.zip" [5540b52f8e] (rid 94100) by mistachkin on 2003-05-14 11:27:32.

  9. Ticket change [f01484470f] (rid 109114) by mistachkin on 2003-05-14 11:27:32:

    1. icomment:
      
      
      File Added - 50297: env.diff.zip
      
      Logged In: YES 
      user_id=113501
      
      davygrvy's patch fixes the leak here.  However, there is 
      a typo in the patch, ckfree(p) should be ckfree(string).
      
      Attaching new patch.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "mistachkin"
  10. Ticket change [b0dddd74a5] (rid 98052) by davygrvy on 2003-05-14 13:15:33:

    1. closedate changed to: "2003-05-14T06:15:33"
    2. closer changed to: "davygrvy"
    3. icomment:
      Logged In: YES 
      user_id=7549
      
      excellent news.  committed (fixed) patch.
      
      
    4. login: "davygrvy"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "davygrvy"
  11. Ticket change [3b90ae2f1c] (rid 112771) by mistachkin on 2003-05-14 15:02:33:

    1. closedate changed to: "2003-05-14T08:02:33"
    2. closer changed to: "mistachkin"
    3. icomment:
      Logged In: YES 
      user_id=113501
      
      Could you please commit this change to the core-8-4-
      branch as well?
      
      Thanks.
      
      
      
    4. login: "mistachkin"
    5. mimetype: "text/plain"
    6. status changed to: "Pending"
    7. username: "mistachkin"
  12. Ticket change [65cae3c54d] (rid 102604) by hobbs on 2003-05-15 00:19:54:

    1. closedate changed to: "2003-05-14T17:19:54"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      I've commited to 8-4-branch.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "hobbs"