Bug #79514 [Opn->Ver]: Memory leaks while including unexistent file

From: Date: Fri, 24 Apr 2020 07:05:00 +0000
Subject: Bug #79514 [Opn->Ver]: Memory leaks while including unexistent file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226750@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79514&edit=1 ID: 79514 Updated by: cmb@php.net Reported by: ferrius7 at gmail dot com Summary: Memory leaks while including unexistent file -Status: Open +Status: Verified Type: Bug Package: *Directory/Filesystem functions Operating System: Linux PHP Version: 7.4.5 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-04-23 14:55:58] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79514&edit=1

« previous php.bugs (#226750) next »