This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Trying to spot memory corruption with core dump
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Pavel Shevaev <pacha dot shevaev at gmail dot com>
- Cc: gdb at sourceware dot org
- Date: Mon, 27 Jul 2009 23:58:10 -0700
- Subject: Re: Trying to spot memory corruption with core dump
- References: <d9c3f61a0907272344q697efd1ag1d9b073be4df94b0@mail.gmail.com>
On Mon, Jul 27, 2009 at 11:44 PM, Pavel Shevaev<pacha.shevaev@gmail.com> wrote:
> My application seg. faults every several hours under moderate load and
> the core dump points to malloc/calloc which I believe is a sign I have
> a serious memory corruption somewhere in my application.
Indeed.
> The problem
> is the fact I can not trace the problematic place in the code and I
> wonder if the core dump can give me some more clues.
Depending on which platform you are on, you may have tools available
which will get you to the problem *much* faster (or at least the
computer will be looking for the problem while you can do something
else :-)
On Linux/ix86 and x86_64, nothing beats Valgrind (for finding heap corruption).
On Solaris, try libumem. Most other UNIX platforms have various heap
checking libraries as well.
Cheers,
--
Paul Pluzhnikov