Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51788 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95821 invoked from network); 1 Apr 2011 13:15:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2011 13:15:32 -0000 Received: from [127.0.0.1] ([127.0.0.1:26745]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id FD/4D-28342-4FFC59D4 for ; Fri, 01 Apr 2011 08:15:32 -0500 Authentication-Results: pb1.pair.com header.from=courtois@templeet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=courtois@templeet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain templeet.org from 91.121.162.155 cause and error) X-PHP-List-Original-Sender: courtois@templeet.org X-Host-Fingerprint: 91.121.162.155 sociatom2.sociatom.com Received: from [91.121.162.155] ([91.121.162.155:43752] helo=ks360347.kimsufi.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9F/1C-28342-AB6B59D4 for ; Fri, 01 Apr 2011 06:27:55 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by ks360347.kimsufi.com (Postfix) with ESMTP id BB03150112 for ; Fri, 1 Apr 2011 13:27:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at sociatom.com Received: from ks360347.kimsufi.com ([127.0.0.1]) by localhost (ks360347.kimsufi.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JDN4dQLzmcUQ for ; Fri, 1 Apr 2011 13:27:35 +0200 (CEST) Received: from [192.168.0.205] (lns-bzn-47f-62-147-131-15.adsl.proxad.net [62.147.131.15]) by ks360347.kimsufi.com (Postfix) with ESMTPA for ; Fri, 1 Apr 2011 13:27:35 +0200 (CEST) Message-ID: <4D95B6AB.30608@templeet.org> Date: Fri, 01 Apr 2011 13:27:39 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: how to find a memory corruption in php ? From: courtois@templeet.org (Pascal COURTOIS) Hi all, I get an error with my program: Fatal error: Allowed memory size of 134217728 bytes exhausted at /home/courtois/php-5.3.6/Zend/zend_execute.h:163 (tried to allocate 261900 bytes) in /var/www/dev4.sociatomdev.com/chroot/htdocs/templeet/fetch.php on line 580 - The same error occurs with any of php 5.3 versions tested. With 5.2 it's ok. - I know the error message is wrong. The program does not consume much memory. - If i change some lines in my php code like adding trace messages it sometimes work sometimes no (but constant result for same php code) I will not submit the bug since it's hard to reproduce unless being in the exact same configuration as me. I used to be an experienced C programmer (>300000 lines written) but almost nothing for the last 15 years. My questions: - is there any document somewhere to read before hunting a bug in php ? - are there any build/compile options other than --enable-debug ? - how should I proceed to debug when php is called via fastcgi ? My configuration: debian squeeze i386 32bits Thanks, Pascal