ID: 36840 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Scripting Engine problem PHP Version: 6CVS-2006-03-24 (CVS) Assigned To: dmitry New Comment:
Fixed in CVS HEAD. Previous Comments: ------------------------------------------------------------------------ [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