php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46042 Mem. leaks when calling mb_convert_encoding using Reflection
Submitted: 2008-09-10 12:14 UTC Modified: 2008-09-10 23:19 UTC
From: felipe@php.net Assigned:
Status: Closed Package: mbstring related
PHP Version: 5.3CVS-2008-09-10 (CVS) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: felipe@php.net
New email:
PHP Version: OS:

 

 [2008-09-10 12:14 UTC] 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 ===



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-10 12:34 UTC] 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 23:19 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 15:01:28 2024 UTC