Bug #68356 [Asn->Fbk]: segfault with opcache and concatenating constant scalar expression twice
| From: | mike@php.net | Date: | Thu, 06 Nov 2014 09:36:48 +0000 |
| Subject: | Bug #68356 [Asn->Fbk]: segfault with opcache and concatenating constant scalar expression twice | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-188485@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68356&edit=1
ID: 68356
Updated by: mike@php.net
Reported by: bigwebguy at gmail dot com
Summary: segfault with opcache and concatenating constant
scalar expression twice
-Status: Assigned
+Status: Feedback
Type: Bug
Package: opcache
PHP Version: 5.6.2
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Could you try PHP-5.6 HEAD? Looks like it's been fixed already.
Previous Comments:
------------------------------------------------------------------------
[2014-11-05 19:16:07] bigwebguy at gmail dot com
Description:
------------
when a dynamic constant string is concatenated with another string anywhere in a class definition,
php will segfault if opcache is enabled.
simply including the class is enough to trigger the segfault.
php does not segfault with opcache disabled or if using integers as the dynamic constant values.
Test script:
---------------
<?php
class Foo {
const FOO = 'Foo';
const FOOBAR = self::FOO.'Bar';
function baz() {
$segfault = self::FOOBAR.'Baz';
}
}
Expected result:
----------------
Expected result: No segfault
$ php --info | grep opcache.enable_cli
opcache.enable_cli => Off => Off
$ php foo.php
$
Actual result:
--------------
Actual result: PHP Segfaults
$ php --info | grep opcache.enable_cli
opcache.enable_cli => On => On
$ php foo.php
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68356&edit=1