#46109 [NEW]: MySQLi::init - Memory leaks
| From: | felipe@php.net | Date: | Wed, 17 Sep 2008 17:54:07 +0000 |
| Subject: | #46109 [NEW]: MySQLi::init - Memory leaks | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-129065@lists.php.net to get a copy of this message | ||
From: felipe@php.net
Operating system:
PHP version: 5.3CVS-2008-09-17 (CVS)
PHP Bug Type: MySQLi related
Bug description: MySQLi::init - Memory leaks
Description:
------------
Calling init() two or more times generates the mem. leak.
Reproduce code:
---------------
<?php
$x = new mysqli;
$x->init();
$x->init();
Actual result:
--------------
==19445== 988 (12 direct, 976 indirect) bytes in 1 blocks are definitely
lost in loss record 5 of 7
==19445== at 0x4021620: malloc (vg_replace_malloc.c:149)
==19445== by 0x83A4EB8: _ecalloc (zend_alloc.c:2414)
==19445== by 0x816F4A1: zif_mysqli_init (mysqli_api.c:1330)
==19445== by 0x83FB4DF: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==19445== by 0x83E9602: execute (zend_vm_execute.h:104)
==19445== by 0x83C3A6E: zend_execute_scripts (zend.c:1197)
==19445== by 0x836916C: php_execute_script (main.c:2080)
==19445== by 0x845B734: main (php_cli.c:1130)
==19445==
==19445==
==19445== 952 bytes in 1 blocks are indirectly lost in loss record 6 of 7
==19445== at 0x4021620: malloc (vg_replace_malloc.c:149)
==19445== by 0x4F3D31C: my_malloc (in
/usr/lib/libmysqlclient_r.so.15.0.0)
==19445== by 0x4F6325E: mysql_init (in
/usr/lib/libmysqlclient_r.so.15.0.0)
==19445== by 0x816F483: zif_mysqli_init (mysqli_api.c:1317)
==19445== by 0x83FB4DF: zend_do_fcall_common_helper_SPEC
(zend_vm_execute.h:315)
==19445== by 0x83E9602: execute (zend_vm_execute.h:104)
==19445== by 0x83C3A6E: zend_execute_scripts (zend.c:1197)
==19445== by 0x836916C: php_execute_script (main.c:2080)
==19445== by 0x845B734: main (php_cli.c:1130)
--
Edit bug report at http://bugs.php.net/?id=46109&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46109&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46109&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46109&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46109&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=46109&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46109&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46109&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46109&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46109&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46109&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46109&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46109&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46109&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46109&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46109&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46109&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46109&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46109&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46109&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46109&r=mysqlcfg