forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-7.4: Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
Showing
2 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--TEST-- | ||
Bug #79412 (Opcache chokes and uses 100% CPU on specific script) | ||
--INI-- | ||
opcache.enable=1 | ||
opcache.optimization_level=-1 | ||
--SKIPIF-- | ||
<?php require_once('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
$limitPerRun = 10; | ||
foreach ($foo as $bar) { | ||
$count = 0; | ||
foreach ($runs as $run) { | ||
++$count; | ||
if ($count >= $limitPerRun) { | ||
break; | ||
} | ||
} | ||
foo($limitPerRun); | ||
} | ||
?> | ||
--EXPECTF-- | ||
Warning: Undefined variable: foo in %s on line %d | ||
|
||
Warning: foreach() argument must be of type array|object, null given in %s on line %d |