php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70913  实例化 Yaf_Controller_Abstract 派生类时php-fpm进程崩溃
Submitted: 2015-11-14 04:24 UTC Modified: 2015-11-15 05:46 UTC
From: 80520997 at qq dot com Assigned: laruence (profile)
Status: Closed Package: yaf (PECL)
PHP Version: 5.6.15 OS:  linux/mac/windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 80520997 at qq dot com
New email:
PHP Version: OS:

 

 [2015-11-14 04:24 UTC] 80520997 at qq dot com
Description:
------------
鸟哥。在Yaf_Controller_Abstract的子类中 new 另外一个 Yaf_Controller_Abstract的子类,并且给构造函数的参数是$obj = new Yaf\Controller_Abstract($this->_request,$this->_response,$this->_view);

或者

$obj = new Yaf\Controller_Abstract($this->getRequest(),$this->getResponse (),$this->getView());

当然我知道抽象类不能实例化。我这里是为了说明问题的演示

结果造成php进程的奔溃

前者在linux系统上面能用windows崩溃。mac上面nginx 502

后者两个系统都崩溃

Test script:
---------------
这个东西太大了。很难有一个简短的脚本演示。鸟哥要是有什么不清楚对可以直接给我邮件


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-14 09:33 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 [2015-11-15 05:31 UTC] 80520997 at qq dot com
鸟哥。你对这个问题解决的方式太过粗暴。在我看来感觉就是没有解决。难道这个问题就不能从实质上面干掉吗?是什么原因导致的呢?难道Yaf_Controller_Abstract的设计就是不能允许多个实例存在吗?
 [2015-11-15 05:46 UTC] 80520997 at qq dot com
关键是这样一来我以前的项目都用不了了。我的项目一直是linux上面跑的。就没在乎这个问题。这两天觉得在服务器上面开发太麻烦了想在本地弄个环节开发。可是发现不能就找你反馈了。可是如果我现在已更新这个扩展点话。由于构造函数做成了私有更不就运行不了来。真个项目都是这么来多。我要哭死了!!
鸟哥还是想个更周全大方式解决一下吧
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC