how to find a memory corruption in php ?
| From: | Pascal COURTOIS | Date: | Fri, 01 Apr 2011 11:27:39 +0000 |
| Subject: | how to find a memory corruption in php ? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-51788@lists.php.net to get a copy of this message | ||
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