Bug #68356 [NEW]: dynamic constants segfault when opcache enabled
From: bigwebguy at gmail dot com
Operating system:
PHP version: 5.6.2
Package: opcache
Bug Type: Bug
Bug description:dynamic constants segfault when opcache enabled
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 bug report at https://bugs.php.net/bug.php?id=68356&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68356&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68356&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68356&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=68356&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=68356&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=68356&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=68356&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=68356&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=68356&r=support
Expected behavior: https://bugs.php.net/fix.php?id=68356&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=68356&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=68356&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=68356&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68356&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=68356&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=68356&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=68356&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=68356&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=68356&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=68356&r=mysqlcfg
Thread (7 messages)
- bigwebguy at gmail dot com