bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fopen/malloc MT bug


From: Wojciech Piechowski
Subject: Re: fopen/malloc MT bug
Date: Wed, 18 Apr 2001 21:58:38 +0200 (CEST)

On 18 Apr 2001, Ulrich Drepper wrote:

> Wolfram Gloger <address@hidden> writes:
> 
> > I believe mcheck is not thread-safe, you can't use -lmcheck and
> > -lpthread together.
> 
> That's correct.

My test don't say that. When I replace fopen() with anything(?) else, it
works. Besides, when I replaced all occurences of fopen() with open() in
the real program, I got rid of clobbered memory (I don't use mcheck in
this program). With fopen() the program was unstable. The little test
program was to show what happened to the large one.

My tests say that mcheck makes no problems itself when multithreaded. I
tried to run my large program (about 10 threads and Qt, intensive
memory allocating) with mcheck and it went much farther than with
fopen(). I suspect that fopen() is not the only one function that may
cause problems.

It may be very difficult to write a test program to show the problem
without mcheck, so I used it. Is there anyone who can authoritatively say
or show that mcheck is not thread-safe() ? (authors here :-?) If yes, then
why I no longer have my memory clobbered even without mcheck?

regards

-- 
-- Wojciech Piechowski - address@hidden - Gadu-Gadu 494156 --




reply via email to

[Prev in Thread] Current Thread [Next in Thread]