|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-11-06 06:57 UTC] mike@php.net
-Summary: dynamic constants segfault when opcache
enabled
+Summary: segfault with opcache and concatenating
constant scalar expression twice
-Assigned To:
+Assigned To: dmitry
[2014-11-06 09:36 UTC] mike@php.net
-Status: Assigned
+Status: Feedback
[2014-11-06 09:36 UTC] mike@php.net
[2014-11-07 07:43 UTC] dmitry@php.net
[2014-11-07 07:54 UTC] mike@php.net
[2014-11-07 08:01 UTC] dmitry@php.net
[2014-11-07 08:12 UTC] mike@php.net
[2014-11-07 08:59 UTC] dmitry@php.net
-Status: Feedback
+Status: Closed
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Feb 06 00:00:02 2026 UTC |
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