PHP memory leaks and invalid pointers on exit
When closing an application that uses PHP, there seems to be a problem with memory leaks and invalid pointers (huge amount of them actually, like a 100kB of invalid pointers each time the app is closed).
Is there something I could be doing wrong?
[Fri Mar 26 16:19:55 2010] Script: '-'
/Users/martin/app/php-5.3-svn/Zend/zend_objects.c(31) : Freeing 0x16EF8C14 (44 bytes), script=-
[Fri Mar 26 16:19:55 2010] Script: '-'
/Users/martin/app/php-5.3-svn/Zend/zend_objects.c(32) : Freeing 0x16EF8C70 (32 bytes), script=-
/Users/martin/app/php-5.3-svn/Zend/zend_alloc.c(2412) : Actual location (location was relayed)
=== Total 2 memory leaks detected ===
[Fri Mar 26 16:19:55 2010] Script: '-'
---------------------------------------
/Users/martin/app/php-5.3-svn/Zend/zend_variables.c(175) : Block 0x171650b0 status:
/Users/martin/app/php-5.3-svn/Zend/zend_execute_API.c(436) : Actual location (location was relayed)
Invalid pointer: ((thread_id=0xB030B000) != (expected=0xA0789500))
---------------------------------------
[Fri Mar 26 16:19:55 2010] Script: '-'
---------------------------------------
/Users/martin/app/php-5.3-svn/Zend/zend_hash.c(531) : Block 0x171684cc status:
Invalid pointer: ((thread_id=0xB030B000) != (expected=0xA0789500))
---------------------------------------
[Fri Mar 26 16:19:55 2010] Script: '-'
---------------------------------------
/Users/martin/app/php-5.3-svn/Zend/zend_hash.c(533) : Block 0x171681f0 status:
Invalid pointer: ((thread_id=0xB030B000) != (expected=0xA0789500))
[...]
3 Answers
-
This is normal for now. Debugging is turned on in the build of PHP we use, because we're still ironing out some of the bugs with it. It will probably be turned off in one of the upcoming releases.
-
Martin:
On some machines this freezes the application when closing (seems to take a while to write the huge amount of debug messages).
Is there any workaround for the moment?
-
Is there any timeframe for when this will be fixed?
I tried to work around an issue with > 2GB files by using PHP, but it seems that doesn't work either due to memory leaks in PHP. (Seems that one can only call PHP functions around 9500 times total before PHP uses up more than the 128M its allowed).
If nothing else, it would be really nice if packaged builds didn't have this issue.