[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fdopen() leaks badly when multithreaded
From: |
Wolfram Gloger |
Subject: |
Re: fdopen() leaks badly when multithreaded |
Date: |
Fri, 15 Mar 2002 16:06:46 +0100 ("MET) |
> This short program demonstrates a fairly serious problem with
> fdopen() when used in a multi-threaded application. The real
> application from which I condensed this actually segfaults, but
> this variant only seems to leak. I've attached the output when
> running it under the glibc 2.2.4 that's in RedHat 7.2, and
Yep, I can reproduce this with glibc-2.2.5, too. Basically, there
seems to be a peculiar failure path inside libio where the allocated
buffer isn't freed. At the moment I can't see anything
thread-specific about this, although it is the multiple threads that
cause the fdopen() to fail occasionally (which I find perplexing, but
that is a different issue..).
I'm working on a patch, but I have to get myself a bit more acquainted
with libio first.
Regards,
Wolfram.