This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: Is -lmcheck thread-safe in glibc 2.0.7 on Linux 2.2x?
- To: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
- Subject: Re: Is -lmcheck thread-safe in glibc 2.0.7 on Linux 2.2x?
- From: george@moberg.com
- Date: Fri, 09 Jul 1999 09:44:56 -0400 (EDT)
- Cc: libc-alpha@sourceware.cygnus.com
- Organization: Moberg Research, Inc.
- Reply-To: george@moberg.com
On 09-Jul-99 Wolfram Gloger wrote:
> Hello,
>
>> I was suspecting that, since it's using the malloc hooks, which themselves
>> aren't protected by the mutex for the arena, etc. Is there another package
>> compatible with glibc which can be used for memory debugging in a
>> multithreaded
>> program?
>
> Hmm, the MALLOC_CHECK_=1 functionality is thread-safe (I hope). It
> may be not quite as comprehensive as -lmcheck, but I've found many,
> many bugs using it.
>
> In glibc-2.1 (not sure about 2.0.7), it will detect overruns of a
> single byte _very_ reliably.
Do I do this when compiling glibc, or compiling my program? If it's for when I
compile my program, does it work for new/delete in C++ the way -lmcheck does?
---
George T. Talbot
<george@moberg.com>