php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63900 Segfault if separated action executes failed
Submitted: 2013-01-04 09:38 UTC Modified: 2013-01-04 10:47 UTC
From: 33326664 at qq dot com Assigned: laruence (profile)
Status: Closed Package: yaf (PECL)
PHP Version: 5.3.20 OS: centos 6.0
Private report: No CVE-ID: None
 [2013-01-04 09:38 UTC] 33326664 at qq dot com
Description:
------------
yaf版本2.2.8  
在使用了Yaf_Action_Abstract后,代码中如果出现错误,
使用了未定义的变量,或者INDEX ERROR
包括级别NOTICE,PHP进程直接产生段错误,无法工作



Test script:
---------------
class SearchAction extends Yaf_Action_Abstract
{
    
    /**
     * 主干逻辑
     *
     * @return void
     */
    public function execute()
    {
        //未定义的变量
        echo $keyword;
        return true;
    }

    /**
     * 析构方法
     *
     * @return void
     */
    public function __destruct()
    {
        //备用
        return;
    }
}

Expected result:
----------------
预期页面工作正常,yaf能正常捕捉错误并抛出异常

Actual result:
--------------
以下是error_log中的错误日志
[Fri Jan 04 17:06:05 2013] [notice] child pid 18019 exit signal Segmentation 
fault 
(11)
[Fri Jan 04 17:06:09 2013] [notice] child pid 18190 exit signal Segmentation 
fault 
(11)
[Fri Jan 04 17:07:44 2013] [notice] child pid 18056 exit signal Segmentation 
fault 
(11)
[Fri Jan 04 17:08:30 2013] [notice] child pid 18184 exit signal Segmentation 
fault 
(11)
[Fri Jan 04 17:08:48 2013] [notice] child pid 18495 exit signal Segmentation 
fault 
(11)
[Fri Jan 04 17:08:51 2013] [notice] child pid 18181 exit signal Segmentation 
fault 
(11)
[Fri Jan 04 17:09:02 2013] [notice] child pid 18127 exit signal Segmentation 
fault 
(11)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-04 09:39 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2013-01-04 09:39 UTC] laruence@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2013-01-04 10:17 UTC] laruence@php.net
-Summary: yaf 使用Actions 产生段错误 +Summary: Segfault if separated action executes failed
 [2013-01-04 10:19 UTC] 33326664 at qq dot com
#0  0x00002aaaab7a8a29 in gc_zval_possible_root (zv=0xae2c78) at 
/usr/local/src/php-5.3.13/Zend/zend_gc.c:143
#1  0x00002aaaafd00ca7 in yaf_dispatcher_handle (dispatcher=0xa74628, 
request=0xa8ebd0, response=0xa74560, view=0xa6d598) at /usr/local/src/yaf-
2.2.8/yaf_dispatcher.c:690
#2  0x00002aaaafd02541 in yaf_dispatcher_dispatch (dispatcher=0xa74628) at 
/usr/local/src/yaf-2.2.8/yaf_dispatcher.c:907
#3  0x00002aaaafcfde79 in zim_yaf_application_run (ht=<value optimized out>, 
return_value=0xa750a8, return_value_ptr=<value optimized out>, this_ptr=0xa68e70, 
return_value_used=<value optimized out>)
    at /usr/local/src/yaf-2.2.8/yaf_application.c:472
#4  0x00002aaaab7b2fc9 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x2aaab07a1050) at /usr/local/src/php-
5.3.13/Zend/zend_vm_execute.h:320
#5  0x00002aaaab7b211e in execute (op_array=0xa66e70) at /usr/local/src/php-
5.3.13/Zend/zend_vm_execute.h:107
#6  0x00002aaaab78b829 in zend_execute_scripts (type=8, retval=0x0, file_count=3) 
at /usr/local/src/php-5.3.13/Zend/zend.c:1236
#7  0x00002aaaab738498 in php_execute_script (primary_file=0x7fffffffe350) at 
/usr/local/src/php-5.3.13/main/main.c:2308
#8  0x00002aaaab81404d in php_handler (r=0xaaf3f8) at /usr/local/src/php-
5.3.13/sapi/apache2handler/sapi_apache2.c:669
#9  0x0000000000436eba in ap_run_handler (r=0xaaf3f8) at config.c:157
#10 0x000000000043a0f2 in ap_invoke_handler (r=0xaaf3f8) at config.c:376
#11 0x000000000044fc9a in ap_internal_redirect (new_uri=<value optimized out>, r=
<value optimized out>) at http_request.c:554
#12 0x00000000004662fa in handler_redirect (r=0xa996f0) at mod_rewrite.c:4843
#13 0x0000000000436eba in ap_run_handler (r=0xa996f0) at config.c:157
#14 0x000000000043a0f2 in ap_invoke_handler (r=0xa996f0) at config.c:376
#15 0x000000000044fe18 in ap_process_request (r=0xa996f0) at http_request.c:282
#16 0x000000000044d0dc in ap_process_http_connection (c=0xa936b0) at 
http_core.c:190
#17 0x000000000043dd7a in ap_run_process_connection (c=0xa936b0) at 
connection.c:43
#18 0x000000000046a1d0 in child_main (child_num_arg=<value optimized out>) at 
prefork.c:667
#19 0x000000000046a3e3 in make_child (s=0x6aa2e0, slot=0) at prefork.c:712
#20 0x000000000046afb6 in ap_mpm_run (_pconf=<value optimized out>, plog=<value 
optimized out>, s=0x6aa2e0) at prefork.c:988
#21 0x000000000042477d in main (argc=2, argv=0x7fffffffe9b8) at main.c:753
 [2013-01-04 10:30 UTC] laruence@php.net
Automatic comment from SVN on behalf of laruence
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=328976
Log: Fixed bug #63900 (Segfault if separated action executes failed)
 [2013-01-04 10:47 UTC] laruence@php.net
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: laruence
 [2013-01-04 10:47 UTC] laruence@php.net
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2013-06-27 03:29 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=pecl/system/yaf.git;a=commit;h=cc70bda7095c85882878c007b3706b8f510eb031
Log: Fixed bug #63900 (Segfault if separated action executes failed)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 12:01:30 2024 UTC