Bug #70228 [Opn->Sus]: Memleak if return in finally block

From: Date: Mon, 10 Aug 2015 14:03:38 +0000
Subject: Bug #70228 [Opn->Sus]: Memleak if return in finally block
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195089@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70228&edit=1

 ID:                 70228
 Updated by:         laruence@php.net
 Reported by:        laruence@php.net
 Summary:            Memleak if return in finally block
-Status:             Open
+Status:             Suspended
 Type:               Bug
 Package:            Scripting Engine problem
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

I am going to suspend this , because without a big change this could be fixed. and we already at
beta stage of PHP7...


Previous Comments:
------------------------------------------------------------------------
[2015-08-10 13:27:33] laruence@php.net

Description:
------------
see test script.



Test script:
---------------
<?php

function foo() {
    try { return chr(0) . "bar"; }
    finally { return chr(32) . "bad"; }
}

var_dump(foo());
?>

Expected result:
----------------
none memleak

Actual result:
--------------
$ sapi/cli/php /tmp/1.php
string(4) " bad"

[Mon Aug 10 21:21:03 2015]  Script:  '/tmp/1.php'
/home/huixinchen/opensource/trunk/Zend/zend_string.h(121) :  Freeing 0x7F1086059CC0 (32 bytes),
script=/tmp/1.php
=== Total 1 memory leaks detected ===


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



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


Thread (2 messages)

« previous php.bugs (#195089) next »