php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76213 Yaf_Dispatcher memory leak
Submitted: 2018-04-12 09:44 UTC Modified: 2021-08-18 15:39 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: fanjiapeng at 126 dot com Assigned:
Status: Open Package: yaf (PECL)
PHP Version: 7.2.4 OS: CentOS release 6.2 (Final)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fanjiapeng at 126 dot com
New email:
PHP Version: OS:

 

 [2018-04-12 09:44 UTC] fanjiapeng at 126 dot com
Description:
------------
PHP environment variable USE_ZEND_ALLOC = 1 (default).
When the parameter value of the Yaf_Request_Http class is wrong, Memory leak is happened.

Test script:
---------------
<?php
$config = array(
    "application" => array(
        "directory" => realpath(dirname(__FILE__)) . "/application",
        "dispatcher" => array(
            "catchException" => 1,
        ),
    ),
);

$app = new Yaf_Application($config);

try {
    $request = new Yaf_Request_Http("/index/admin/login1");
    $app->getDispatcher()->dispatch($request);
} catch(Yaf_Exception $e) {
    var_dump($e->getMessage());
}


Expected result:
----------------
string(98) "Failed opening controller script /www/application/controllers/Error.php: No such file or directory"

Actual result:
--------------
string(98) "Failed opening controller script /www/application/controllers/Error.php: No such file or directory"
[Thu Apr 12 17:05:25 2018]  Script:  '/www/task.php'
Zend/zend_string.h(134) :  Freeing 0x00000001024029c0 (32 bytes), script=/www/task.php
[Thu Apr 12 17:05:25 2018]  Script:  '/www/task.php'
/usr/local/php/php-7.2.4/Zend/zend_objects.c(161) :  Freeing 0x000000010247e0c0 (152 bytes), script=/www/task.php
=== Total 2 memory leaks detected ===

Patches

yaf_dispatcher.patch (last revision 2018-04-12 09:45 UTC by fanjiapeng at 126 dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-08-18 15:39 UTC] cmb@php.net
If this issue still persists, I suggest you submit a PR against
the yaf repo[1].

[1] <https://github.com/laruence/yaf/pulls>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 01:01:30 2024 UTC