#37529 [NEW]: Command line script leaks memory and segfaults
| From: | hiro at dusk dot org | Date: | Fri, 19 May 2006 20:36:56 +0000 |
| Subject: | #37529 [NEW]: Command line script leaks memory and segfaults | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-97385@lists.php.net to get a copy of this message | ||
From: hiro at dusk dot org
Operating system: Ubuntu Linux
PHP version: 5.1.4
PHP Bug Type: Reproducible crash
Bug description: Command line script leaks memory and segfaults
Description:
------------
A unit test for our application causes a segfault in a certain block of
code. I recompiled PHP 5.1.4. with debugging symbols and it reports a
number of memory leaks. On all systems I've tried it on it either
segfaults or produces a bus error.
Reproduce code:
---------------
This is happening deep inside one of the most complex parts of a pretty
big application (95,000 lines of PHP not even counting any HTML templates
and over 100 classes) and unfortunately I cannot see any way to produce
any sort of test case that does not include the entire application.
Actual result:
--------------
[Fri May 19 13:34:56 2006] Script: 'planchangestackmull'
/home/adam/dl/php-5.1.4/Zend/zend_vm_execute.h(7531) : Freeing 0x025E83E8
(24 bytes), script=planchangestackmull
Last leak repeated 5 times
[Fri May 19 13:34:56 2006] Script: 'planchangestackmull'
/home/adam/dl/php-5.1.4/Zend/zend_variables.c(133) : Freeing 0x0253F608
(64 bytes), script=planchangestackmull
/home/adam/dl/php-5.1.4/Zend/zend_hash.c(169) : Actual location (location
was relayed)
Last leak repeated 5 times
[Fri May 19 13:34:56 2006] Script: 'planchangestackmull'
/home/adam/dl/php-5.1.4/Zend/zend_variables.h(45) : Freeing 0x024F4208
(72 bytes),
script=planchangestackmull/home/adam/dl/php-5.1.4/Zend/zend_variables.c(132)
: Actual location (location was relayed)
Last leak repeated 7 times
[Fri May 19 13:34:56 2006] Script: 'planchangestackmull'
/home/adam/dl/php-5.1.4/Zend/zend_hash.c(760) : Freeing 0x024F3EE8 (71
bytes), script=planchangestackmull
/home/adam/dl/php-5.1.4/Zend/zend_hash.c(383) : Actual location (location
was relayed)
Last leak repeated 9 times
[Fri May 19 13:34:56 2006] Script: 'planchangestackmull'
/home/adam/dl/php-5.1.4/ext/pgsql/pgsql.c(1968) : Freeing 0x024233D8 (7
bytes), script=planchangestackmull
Last leak repeated 7 times
[Fri May 19 13:34:56 2006] Script: 'planchangestackmull'
/home/adam/dl/php-5.1.4/Zend/zend_API.c(1065) : Freeing 0x021702C8 (24
bytes), script=planchangestackmull
Last leak repeated 7 times
[Fri May 19 13:34:56 2006] Script: 'planchangestackmull'
/home/adam/dl/php-5.1.4/Zend/zend_vm_execute.h(182) : Freeing 0x021844E8
(24 bytes), script=planchangestackmull
Last leak repeated 1 time
=== Total 48 memory leaks detected ===
--
Edit bug report at http://bugs.php.net/?id=37529&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37529&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37529&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37529&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37529&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37529&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37529&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37529&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37529&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37529&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37529&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37529&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37529&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37529&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37529&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37529&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37529&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37529&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37529&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37529&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37529&r=mysqlcfg