php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79514 Memory leaks while including unexistent file
Submitted: 2020-04-23 14:55 UTC Modified: 2020-04-24 07:05 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: ferrius7 at gmail dot com Assigned: cmb (profile)
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 7.4.5 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ferrius7 at gmail dot com
New email:
PHP Version: OS:

 

 [2020-04-23 14:55 UTC] ferrius7 at gmail dot com
Description:
------------
 - in php 7.4.5 with disabled cli (opcache.enable_cli=0) memory leaks and increasing execution time.

 - in php 7.3.15 with disabled cli (opcache.enable_cli=0) everything is ok.

In case with enabled cli opcache php 7.4 works as expected with no leaks. 

Test script:
---------------
<?php
$i = 0;

while ($i < 100000) {
    $checkpoint = ($i % 10000 === 0);

    if ($checkpoint) {
        $start = hrtime(true);
    }

    @include __DIR__ . '/unexistentfile';

    if ($checkpoint) {
        echo "time: " . (int)((hrtime(true) - $start)/1000) . " micro s    $i\n";
        echo "alloc mem: " . (memory_get_usage(true) / 1024 / 1024) . "Mb \n";
    }

    ++$i;
}


Expected result:
----------------
No memory leaks and constant execution time of each iteration

Actual result:
--------------
Memory leaks and increasing execution time

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-04-24 07:05 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2020-04-24 16:18 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3151676f520555bfadb39ea76779e93552d13fc1
Log: Fix #79514: Memory leaks while including unexistent file
 [2020-04-24 16:18 UTC] cmb@php.net
-Status: Verified +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 03 06:01:29 2024 UTC