|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63907 SegFault
Submitted: 2013-01-04 21:41 UTC Modified: 2016-11-18 21:21 UTC
From: anilvarghese25 at gmail dot com Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 5.4.10 OS: Linux
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: anilvarghese25 at gmail dot com
New email:
PHP Version: OS:


 [2013-01-04 21:41 UTC] anilvarghese25 at gmail dot com
Apache process crashes with a segfault. Was able to narrow it down to 
zend_vm_execute.h line 580 using the backtrace. Looks like fbc->common.fn_flags 
in the code is causing the issue.

!= 0)) {
                if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_ABSTRACT) != 0)) 
                        zend_error_noreturn(E_ERROR, "Cannot call abstract 
method %s::%s()", fbc->common.scope->name, fbc->common.function_name);
                if (UNEXPECTED((fbc->common.fn_flags & ZEND_ACC_DEPRECATED) != 
0)) {
                        zend_error(E_DEPRECATED, "Function %s%s%s() is 
                                fbc->common.scope ? fbc->common.scope->name : 
                                fbc->common.scope ? "::" : "",

Actual result:
Program received signal SIGSEGV, Segmentation fault.
0x00002aaab3d80b87 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x2aaab8574288) at /tmp/php-5.4.10/Zend/zend_vm_execute.h:580
580             if (UNEXPECTED((fbc->common.fn_flags & 
(gdb) bt
#0  0x00002aaab3d80b87 in zend_do_fcall_common_helper_SPEC 
(execute_data=0x2aaab8574288) at /tmp/php-5.4.10/Zend/zend_vm_execute.h:580
#1  0x00002aaab3d893fc in ZEND_DO_FCALL_SPEC_CONST_HANDLER 
(execute_data=0x2aaab8574288) at /tmp/php-5.4.10/Zend/zend_vm_execute.h:2235
#2  0x00002aaab3d7fb1e in execute (op_array=0x2aaaed5fc150) at /tmp/php-
#3  0x00002aaab3d417d4 in zend_execute_scripts (type=8, retval=0x0, 
file_count=3) at /tmp/php-5.4.10/Zend/zend.c:1309
#4  0x00002aaab3ca9006 in php_execute_script (primary_file=0x7fffffffe430) at 
#5  0x00002aaab3e970e7 in php_handler (r=0x2aaaecd91ff0) at /tmp/php-
#6  0x00002aaaaaad4d1a in ap_run_handler ()
#7  0x00002aaaaaad81a8 in ap_invoke_handler ()
#8  0x00002aaaaaae2ca8 in ap_process_request ()
#9  0x00002aaaaaadfee0 in ?? ()
#10 0x00002aaaaaadbfa2 in ap_run_process_connection ()
#11 0x00002aaaaaae70d9 in ?? ()
#12 0x00002aaaaaae72d9 in ?? ()
#13 0x00002aaaaaae7df7 in ap_mpm_run ()
#14 0x00002aaaaaac1fd8 in main ()


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-04 22:00 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

 [2013-01-04 22:00 UTC]
-Status: Open +Status: Feedback
 [2013-01-09 23:11 UTC] anilvarghese25 at gmail dot com
-Status: Feedback +Status: Open
 [2013-01-09 23:11 UTC] anilvarghese25 at gmail dot com
This might not be very helpful. But it looks like bad apc caching. I was able to 
narrow it down to the following code. Its part of the Zend Framework. If I force 
an opcode recache, it works fine. I am using APC 3.1.14. 

class Zend_Filter extends Zend_Filter_Interface {

public static function get($value, $classBaseName, array $args = array(),   
$namespaces = array())
        $namespaces = array_merge(array('Zend_Filter'), (array) $namespaces);
        foreach ($namespaces as $namespace) {
            $className = $namespace . '_' . ucfirst($classBaseName);
            $class = new ReflectionClass($className);
            if ($class->implementsInterface('Zend_Filter_Interface')) {
                if ($class->hasMethod('__construct')) {
                    $object = $class->newInstanceArgs($args);
                } else {
                    $object = $class->newInstance();
                return $object->filter($value);

        throw new Zend_Filter_Exception("Filter class not found from basename 
 [2013-10-24 06:37 UTC]
-Package: *General Issues +Package: APC
 [2016-11-18 21:21 UTC]
-Status: Open +Status: Wont fix
 [2016-11-18 21:21 UTC]
APC is no longer supported in favor of opcache that comes bundled with PHP, if you wish to use the user cache, then look at PECL/APCu.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Aug 12 03:05:46 2022 UTC