php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72762 Infinite loop while parsing a file with opcache enabled
Submitted: 2016-08-05 11:54 UTC Modified: 2016-08-05 13:59 UTC
From: nicolas dot grekas+php at gmail dot com Assigned: nikic (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 7.1.0beta1 OS: Linux
Private report: No CVE-ID: None
 [2016-08-05 11:54 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-08-05 13:59 UTC] nikic@php.net
-Assigned To: +Assigned To: nikic
 [2016-08-05 13:59 UTC] nikic@php.net
Looks like an infinite loop in type inference.
 [2016-08-05 14:33 UTC] nikic@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fc7c81ff5484f28221c89be0847ea521b707aa8c
Log: Fixed bug #72762
 [2016-08-05 14:33 UTC] nikic@php.net
-Status: Assigned +Status: Closed
 [2016-10-17 10:10 UTC] bwoebi@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fc7c81ff5484f28221c89be0847ea521b707aa8c
Log: Fixed bug #72762
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC