[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fopen/malloc MT bug
From: |
Wolfram Gloger |
Subject: |
Re: fopen/malloc MT bug |
Date: |
Wed, 18 Apr 2001 12:00:16 +0200 (MDT) |
Hello,
> In a multithreaded program (Linux 2.2.15, glibc 2.2-5, gcc 2.96) I noticed
> the following problem: memory gets corrupted when one thread calls
> malloc() and another calls fopen() at the same time.
Works fine for me with glibc-2.1.3 and -2.2.2, as long as I don't use
mcheck.
> Please let me know if you know some other workarounds, a real solution or
> anything about this bug (or is it my mistake?) because replacing
> fopen() with open() is not what I really need.
I believe mcheck is not thread-safe, you can't use -lmcheck and
-lpthread together. (Someone correct me if I'm wrong.) If you need
simple checking with threaded programs, try the environment variable
MALLOC_CHECK_.
Regards,
Wolfram.
- fopen/malloc MT bug, Wojciech Piechowski, 2001/04/17
- Re: fopen/malloc MT bug,
Wolfram Gloger <=