]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorDmitry Stogov <dmitry@zend.com>
Wed, 25 Mar 2020 14:38:08 +0000 (17:38 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 25 Mar 2020 14:38:08 +0000 (17:38 +0300)
* PHP-7.4:
  Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).

1  2 
ext/opcache/Optimizer/zend_inference.c
ext/opcache/tests/bug79412.phpt

index 0000000000000000000000000000000000000000,20fb0a5ba9783708b28e7b329b708fe88b5c34e2..6c9232ff85adc00733c48439ba499753163420ff
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,25 +1,25 @@@
 -Notice: Undefined variable: foo in %s on line %d
+ --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: Invalid argument supplied for foreach() in %s on line %d
++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