From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29359 invoked by alias); 28 Jul 2009 06:58:24 -0000 Received: (qmail 29347 invoked by uid 22791); 28 Jul 2009 06:58:23 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Jul 2009 06:58:16 +0000 Received: from spaceape7.eur.corp.google.com (spaceape7.eur.corp.google.com [172.28.16.141]) by smtp-out.google.com with ESMTP id n6S6wDkf012690 for ; Tue, 28 Jul 2009 07:58:13 +0100 Received: from qyk14 (qyk14.prod.google.com [10.241.83.142]) by spaceape7.eur.corp.google.com with ESMTP id n6S6wAsJ025716 for ; Mon, 27 Jul 2009 23:58:11 -0700 Received: by qyk14 with SMTP id 14so5157176qyk.1 for ; Mon, 27 Jul 2009 23:58:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.99.76 with SMTP id t12mr1763765qcn.46.1248764290488; Mon, 27 Jul 2009 23:58:10 -0700 (PDT) In-Reply-To: References: Date: Tue, 28 Jul 2009 06:58:00 -0000 Message-ID: <8ac60eac0907272358n7cd27407va0a9982ea4d466bc@mail.gmail.com> Subject: Re: Trying to spot memory corruption with core dump From: Paul Pluzhnikov To: Pavel Shevaev Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00217.txt.bz2 On Mon, Jul 27, 2009 at 11:44 PM, Pavel Shevaev 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