php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70557 Memleak on return type verifying failed
Submitted: 2015-09-23 06:02 UTC Modified: -
From: laruence@php.net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 7.0.0RC3 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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: laruence@php.net
New email:
PHP Version: OS:

 

 [2015-09-23 06:02 UTC] laruence@php.net
Description:
------------
verify type fail will leak memory if the op1 of zend_return is IS_CONST (only visible run without opcache due to interned-string-fy in opcache)

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

function getNumber() : int {
    return "foo";
}

try {
    getNumber();
} catch (TypeError $e) {

}
?>

Expected result:
----------------
non memleak

Actual result:
--------------
$ /home/huixinchen/local/php7/bin/php -n /tmp/1.php
[Wed Sep 23 13:59:30 2015]  Script:  '/tmp/1.php'
/home/huixinchen/opensource/php-7.0/Zend/zend_string.h(121) :  Freeing 0x7FFFF8059B00 (32 bytes), script=/tmp/1.php
=== Total 1 memory leaks detected ===

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-23 06:10 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1e3333e4bd84d84524c0671b63801b5ad5e1b200
Log: Fixed Bug #70557 (Memleak on return type verifying failed)
 [2015-09-23 06:10 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2015-09-29 13:10 UTC] ab@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1e3333e4bd84d84524c0671b63801b5ad5e1b200
Log: Fixed Bug #70557 (Memleak on return type verifying failed)
 [2016-07-20 11:36 UTC] davey@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=1e3333e4bd84d84524c0671b63801b5ad5e1b200
Log: Fixed Bug #70557 (Memleak on return type verifying failed)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 11:01:29 2024 UTC