From dev-return-12809-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Thu Sep 16 15:27:23 2004 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 92243 invoked from network); 16 Sep 2004 15:27:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Sep 2004 15:27:22 -0000 Received: (qmail 17338 invoked by uid 500); 16 Sep 2004 15:27:20 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 17297 invoked by uid 500); 16 Sep 2004 15:27:20 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 17284 invoked by uid 99); 16 Sep 2004 15:27:19 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Message-ID: <044001c49c01$a5b947a0$6501a8c0@desktop2> From: "Stephen Ince" To: "APR Development" References: <03ac01c49bb6$178f58c0$6501a8c0@desktop2> <20040916080152.GA6409@redhat.com> Subject: Re: memory analysis Date: Thu, 16 Sep 2004 11:27:09 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Joe, Thanx for the insight. The stack overflow is probabely impossible to catch. I guess that's why it is dangerous to use buffers off the stack. Steve ----- Original Message ----- From: "Joe Orton" To: "APR Development" Sent: Thursday, September 16, 2004 4:01 AM Subject: Re: memory analysis > On Thu, Sep 16, 2004 at 02:26:20AM -0400, Stephen Ince wrote: > > Hi, > > I am trying to find memory errors in my application and I am having a > > hard time. I tried setting APR_POOL_DEBUG=2 but it is catching the errors. > > Using --enable-pool-debug in conjunction with a malloc() checker like > ElectricFence is a good bet; this will catch heap buffer overruns (and > underruns if efence is configured appropriately). To catch stack > overflows you need a smarter compiler, APR can't help with that. > > ISTR someone once had a hack which enabled efence-like mprotect() stuff > inside apr_pools.c... hmmmm, Google says it was Greg but is refusing to > divulge actually patches. > > joe >