|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72568 segmentation fault of self-recursive call
Submitted: 2016-07-09 18:02 UTC Modified: 2021-02-03 12:37 UTC
Avg. Score:4.0 ± 0.8
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: rana dot ram at gmail dot com Assigned: cmb (profile)
Status: Wont fix Package: pthreads (PECL)
PHP Version: 7.0.8 OS: CentOS 6.4
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:
Bug Type:
From: rana dot ram at gmail dot com
New email:
PHP Version: OS:


 [2016-07-09 18:02 UTC] rana dot ram at gmail dot com
Segmentation fault on self recursive call by a class instance method to itself.

Test script:

class ABC {
    public function self_recursive() {

$obj = new ABC();

Expected result:
- Memory exhausted error
- or, Max execution limit reached
- or,  a infinite recursion exception

Actual result:
Starting program: /usr/local/bin/php test.php

Program received signal SIGSEGV, Segmentation fault.
0x00000000008d51b3 in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7fffe3c710d0) at /usr/local/src/php-7.0.8/Zend/zend_vm_execute.h:800
800                                     zend_execute_ex(call);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-09 18:14 UTC]
-Status: Open +Status: Feedback
 [2016-07-09 18:14 UTC]
Please make sure that you're using no third-party extensions, in particular debuggers or profilers. This happens only if an extension overwrites zend_execute_ex.
 [2016-07-10 02:43 UTC] rana dot ram at gmail dot com
you are right!  one of the extension (pthreads) causing this.
 [2016-07-10 02:46 UTC] rana dot ram at gmail dot com
-Status: Feedback +Status: Open -Package: Reproducible crash +Package: pthreads
 [2016-07-10 02:46 UTC] rana dot ram at gmail dot com
updated "Package" to "pthreads"
 [2016-11-09 11:53 UTC] odigiman at gmail dot com
Reproduced on a range of Linux distributions. (PHP 7.0.12, pthreads 3.1.6)

On Windows, a crash is also observed, but with a php exit 127. This does not happen without pthreads.
 [2021-02-03 12:37 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-02-03 12:37 UTC]
The maintainer of PECL/pthreads has ceased its developement for
good reasons[1].  Consider to use PECL/parallel[2] instead.

[1] <>
[2] <>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 09:01:30 2024 UTC