|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-08-11 13:49 UTC] laruence@php.net
[2015-08-11 13:49 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2015-08-11 14:37 UTC] laruence@php.net
[2015-08-18 16:24 UTC] ab@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 23:00:01 2025 UTC |
Description: ------------ If I enable opcache on cli environment (opcache.enable_cli) and run my test.php script I get: "[1] 19066 segmentation fault (core dumped) php test.php" This happens only if while (or do-while) condition is variable and content (between curly braces) is empty or contains only comments. Actually the code makes no sense, but I had to debug few hours and found this exact code with only comment "// TODO: .." in do-while braces. Commenting out whole loop block fixed issue, but it's still a bug I think. Reproduced on php 5.5.27 and 5.6.11 Test script: --------------- <?php if ((int) ini_get('opcache.enable_cli') !== 1) { throw new Exception('Opcode cache must be enabled on CLI environment'); } function neverUsed() { $bool = false; while ($bool) { }; // Same with: do { } while ($bool); } echo "OK"; Expected result: ---------------- Expected to see OK printed Actual result: -------------- [1] 19066 segmentation fault (core dumped) php test.php