ID:          36840
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:      Assigned
+Status:      Closed
 Bug Type:    Scripting Engine problem
 PHP Version: 6CVS-2006-03-24 (CVS)
 Assigned To: dmitry
 New Comment:

Doesn't seem to be valid anymore.


Previous Comments:
------------------------------------------------------------------------

[2006-03-27 09:33:34] [EMAIL PROTECTED]

Re-opened.

Throwing exceptions from conversion routines is bad solution. They are
called from many different places and we cannot fix every place to care
about exception.

------------------------------------------------------------------------

[2006-03-24 11:13:56] [EMAIL PROTECTED]

Fixed in CVS HEAD.

------------------------------------------------------------------------

[2006-03-24 08:52:32] [EMAIL PROTECTED]

Description:
------------
If a cast operator inside try {} block throws an exception, the result
of casting is never destructed and, thus, a memory leak happens.




Reproduce code:
---------------
<?php
$u = "abc \udc00 def\n";

try {
    echo (binary)$u;
} catch(UnicodeConversionException $e) {

}
?>

INI settings:

unicode_semantics = on
unicode.output_encoding = latin-1
unicode.runtime_encoding = latin-1
unicode.from_error_mode = U_CONV_ERROR_STOP | U_CONV_ERROR_EXCEPTION


Expected result:
----------------
no output

Actual result:
--------------
[Thu Mar 23 23:49:50 2006]  Script:  't.php'
/homes/andrei/dev/php-src/Zend/zend_unicode.c(253) :  Freeing
0x013EC764 (11 bytes), script=t.php
=== Total 1 memory leaks detected ===



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36840&edit=1

Reply via email to