|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesyaf_dispatcher.patch (last revision 2018-04-12 09:45 UTC by fanjiapeng at 126 dot com)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-08-18 15:39 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
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 ===