Re: Trying to spot memory corruption with core dump

Paul Pluzhnikov
2009-07-28T06:58:24Z

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