Am 07.04.2005 um 05:34 schrieb Jeff Hobbs:

OK, looks like Tcl 8.4.7 introduced the leak.  Here's my test
run against Tcl 8.4.6:

I would suspect this patch from Kenny / Mistachkin (applied by me):

2004-07-20  Jeff Hobbs  <[EMAIL PROTECTED]>

        * generic/tclEvent.c:       Correct threaded obj allocator to
        * generic/tclInt.h:         fully cleanup on exit and allow for
        * generic/tclThreadAlloc.c: reinitialization. [Bug #736426]
        * unix/tclUnixThrd.c:       (mistachkin, kenny)
        * win/tclWinThrd.c:


This is the one. More precisely the unix/tclUnixThrd.c as of 8.4.7 (and later) looks like:

void TclpFreeAllocCache(ptr)
    void *ptr;
{
    extern void TclFreeAllocCache(void *);

    TclFreeAllocCache(ptr);
    /*
     * Perform proper cleanup of things done in TclpGetAllocCache.
     */
    if (initialized) {
        pthread_key_delete(key);
        initialized = 0;
    }
}

If you modify it too read:

void TclpFreeAllocCache(ptr)
    void *ptr;
{
    extern void TclFreeAllocCache(void *);

    TclFreeAllocCache(ptr);
}

the leak is gone. Now I have to rewind the stack and try to
figure out what did the author(s) *really* wanted to do.
Seems that somebody was cleaning up some state but cleaned
up much to much...

Zoran


-- AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to