#46042 [Opn->Csd]: Mem. leaks when calling mb_convert_encoding using Reflection
| From: | iliaa@php.net | Date: | Wed, 10 Sep 2008 23:19:57 +0000 |
| Subject: | #46042 [Opn->Csd]: Mem. leaks when calling mb_convert_encoding using Reflection | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-128859@lists.php.net to get a copy of this message | ||
ID: 46042
Updated by: iliaa@php.net
Reported By: felipe@php.net
-Status: Open
+Status: Closed
Bug Type: mbstring related
Operating System: *
PHP Version: 5.3CVS-2008-09-10 (CVS)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2008-09-10 12:34:46] felipe@php.net
See also:
$x = new reflectionfunction('mb_detect_encoding');
$x->invokeArgs(array(1,2,3));
Warning: mb_detect_encoding(): Illegal argument in %s on line 4
[Wed Sep 10 09:33:38 2008] Script: '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(3241) : Freeing
0x08BC5F14 (20 bytes), script=%s
[Wed Sep 10 09:33:38 2008] Script: '%s'
/home/felipe/dev/php5/main/spprintf.c(764) : Freeing 0x08BC5F58 (79
bytes), script=%s
-------
$x = new reflectionfunction('mb_substitute_character');
$x->invoke(array());
Warning: mb_substitute_character(): Unknown character. in %s on line 8
[Wed Sep 10 09:32:46 2008] Script: '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(2035) : Freeing
0x08BC5BCC (20 bytes), script=%s
=== Total 1 memory leaks detected ===
------------------------------------------------------------------------
[2008-09-10 12:14:14] felipe@php.net
Description:
------------
See below.
Reproduce code:
---------------
<?php
$x = new reflectionfunction('mb_convert_encoding');
$x->invokeArgs(array(1, 2, 3));
Expected result:
----------------
Warning: mb_convert_encoding(): Unknown encoding "2" in %s on line %d
[Wed Sep 10 09:11:05 2008] Script: '%s'
/home/felipe/dev/php5/ext/mbstring/mbstring.c(3120) : Freeing
0x08BC5F94 (20 bytes), script=%s
[Wed Sep 10 09:11:05 2008] Script: '%s'
/home/felipe/dev/php5/main/spprintf.c(764) : Freeing 0x08BC5FD8 (79
bytes), script=%s
=== Total 2 memory leaks detected ===
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46042&edit=1