Bug #77162 [Com]: endless-loop script segfaults instead of exit with a proper error
| From: | maggus dot staab at googlemail dot com | Date: | Thu, 15 Nov 2018 15:59:34 +0000 |
| Subject: | Bug #77162 [Com]: endless-loop script segfaults instead of exit with a proper error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217977@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77162&edit=1
ID: 77162
Comment by: maggus dot staab at googlemail dot com
Reported by: maggus dot staab at googlemail dot com
Summary: endless-loop script segfaults instead of exit with a
proper error
Status: Feedback
Type: Bug
Package: *General Issues
Operating System: ubuntu16 lts
PHP Version: 7.0.32
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
running the very same test on ubuntu18 with php7.2 works without a problem.
as soon as I disable blackfire on my php 7.0.x it also works without a segfault.
Will report it to blackfire then.
Previous Comments:
------------------------------------------------------------------------
[2018-11-15 10:46:02] nikic@php.net
This is almost certainly due to the blackfire extension, which will hook zend_execute and thus force
call stack recursion rather than VM recursion.
------------------------------------------------------------------------
[2018-11-15 10:38:27] cmb@php.net
Please also try with any of the actively supported PHP
versions[1].
[1] <http://php.net/supported-versions.php>
------------------------------------------------------------------------
[2018-11-15 10:10:43] sjon at hortensius dot net
Did you try without extensions? It works pretty good here https://3v4l.org/p07m1
------------------------------------------------------------------------
[2018-11-15 10:03:56] maggus dot staab at googlemail dot com
Description:
------------
the following code segfaults on the php-cli (and on mod_php) but I expected a proper error to happen
mstaab@mst16:/tmp$ php test.php
Speicherzugriffsfehler (Speicherabzug geschrieben)
mstaab@mst16:/tmp$ php -v
PHP 7.0.32-4+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Nov 4 2018 05:10:29) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.32-4+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend
Technologies
with blackfire v1.23.1~linux-x64-non_zts70, https://blackfire.io, by Blackfire
Test script:
---------------
<?php
// test.php
class a {
private $prop;
public function __construct() {
$this->prop = new a();
}
}
new a();
Expected result:
----------------
no segfault
Actual result:
--------------
segfaults
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77162&edit=1