Bug #68356 [Fbk]: segfault with opcache and concatenating constant scalar expression twice

From: Date: Fri, 07 Nov 2014 08:12:11 +0000
Subject: Bug #68356 [Fbk]: segfault with opcache and concatenating constant scalar expression twice
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-188498@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: Feedback Type: Bug Package: opcache PHP Version: 5.6.2 Assigned To: dmitry Block user comment: N Private report: N New Comment: I'll church if it's also fixed in upcoming 5.6.3 Previous Comments: ------------------------------------------------------------------------ [2014-11-07 08:01:29] dmitry@php.net Not reproducible with current 5.6.4-dev. So it must be fixed some time ago. ------------------------------------------------------------------------ [2014-11-07 07:54:34] mike@php.net It's definitely reproducible with 5.6.2 non-debug. ------------------------------------------------------------------------ [2014-11-07 07:43:54] dmitry@php.net I didn't fix anything related on November, but I can't reproduce it as well. May be it was false alarm? ------------------------------------------------------------------------ [2014-11-06 09:36:47] mike@php.net Could you try PHP-5.6 HEAD? Looks like it's been fixed already. ------------------------------------------------------------------------ [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

« previous php.bugs (#188498) next »