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

History Of Ticket 218821ffffffffff

Artifacts Associated With Ticket 218821ffffffffff

  1. Ticket change [7222ef4dfc] (rid 100807) by nobody on 2000-10-26 01:05:59:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2254 Bug
      Version: 8.1
      SubmitDate: '1999-06-21'
      LastModified: '1999-07-01'
      Severity: MED
      Status: Released
      Submitter: techsupp
      ChangedBy: foster
      OS: Other
      Machine: NA
      FixedDate: '1999-06-21'
      FixedInVersion: 8.2b1
      ClosedDate: '2000-10-25'
      
      
      Name:
      Andrej Vckovski
      
      CVS:
      tclUnixThrd.c 1.18 98/02/19 14:24:12
      
      ObservedBehavior:
      in TclpThreadCreate(), the pthread_attr_t attr structure is not
          destroyed.
          This causes a Memory Leak. However, I am not 100% sure if that's really
          ok, as I
          as a uninitalized memory read on thr_create() after fixing this. But
          according
          to POSIX threads definition an attr structure needs to be destroyed
          after usage.
      
      DesiredBehavior:
      no leak
      
      Patch:
      *** tclUnixThrd.c       Fri Jun 18 20:48:24 1999
      --- tclUnixThrd.c.fixed Fri Jun 18 19:53:42 1999
      ***************
      *** 71,85 ****
            Tcl_ThreadCreateProc proc;                /* Main() function of the thread */
            ClientData clientData;            /* The one argument to Main() */
        {
            pthread_attr_t attr;
      
            pthread_attr_init(&attr);
            pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
            if (pthread_create((pthread_t *)idPtr, &attr, (void * (*)())proc, (void *)clientData) < 0) {
      !       return TCL_ERROR;
            } else {
      !       return TCL_OK;
            }
        }
      
        /*
      --- 71,88 ----
            Tcl_ThreadCreateProc proc;                /* Main() function of the thread */
            ClientData clientData;            /* The one argument to Main() */
        {
      +     int res;
            pthread_attr_t attr;
      
            pthread_attr_init(&attr);
            pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
            if (pthread_create((pthread_t *)idPtr, &attr, (void * (*)())proc, (void *)clientData) < 0) {
      !       res = TCL_ERROR;
            } else {
      !       res = TCL_OK;
            }
      +     pthread_attr_destroy(&attr);
      +     return res;
        }
      
        /*
      
      PatchFiles:
      tclUnixThrd.c
      
      
      
      06/21/1999 11:53 - stanton - Applied patch
      
    4. foundin initialized to: "obsolete: 8.1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "49. Threading"
    10. title initialized to: "Memory leak on thread creation"
    11. type initialized to: "Bug"
  2. Ticket change [a6df78d77e] (rid 98680) by welch on 2000-10-26 08:29:17:

    1. closedate changed to: "2000-10-26T01:29:17"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"