Bug #72762 [Opn]: Infinite loop while parsing a file with opcache enabled

From: Date: Fri, 05 Aug 2016 13:59:10 +0000
Subject: Bug #72762 [Opn]: Infinite loop while parsing a file with opcache enabled
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202963@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72762&edit=1

 ID:                 72762
 Updated by:         nikic@php.net
 Reported by:        nicolas dot grekas+php at gmail dot com
 Summary:            Infinite loop while parsing a file with opcache
                     enabled
 Status:             Open
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Linux
 PHP Version:        7.1.0beta1
-Assigned To:        
+Assigned To:        nikic
 Block user comment: N
 Private report:     N

 New Comment:

Looks like an infinite loop in type inference.


Previous Comments:
------------------------------------------------------------------------
[2016-08-05 11:54:40] nicolas dot grekas+php at gmail dot com

Description:
------------
Run the test script below with:
php -n -d zend_extension=opcache.so -d opcache.enable_cli=1 test.php

and see php (opcache) enter an infinite loop that only kill -9 can break

(note that the script is meaningless but it triggers the behavior I also had with a real longer
script)

Test script:
---------------
<?php

class foo
{
    function bar()
    {
        $b = array();

        foreach ($a as $a) {
            foreach ($b as $k => $v) {
            }
            $b[$k] = $v;
        }
    }
}


Expected result:
----------------
-

Actual result:
--------------
php enters an infinite loop that only kill -9 can break


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=72762&edit=1


Thread (3 messages)

« previous php.bugs (#202963) next »