Bug #78297 [Com]: Include unexistent file memory leak
| From: | a at ustimen dot co | Date: | Tue, 16 Jul 2019 09:10:23 +0000 |
| Subject: | Bug #78297 [Com]: Include unexistent file memory leak | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-221809@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78297&edit=1
ID: 78297
Comment by: a at ustimen dot co
Reported by: a at ustimen dot co
Summary: Include unexistent file memory leak
Status: Assigned
Type: Bug
Package: phpdbg
Operating System: Linux
PHP Version: 7.2.20
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
By bisecting I found breaking commit:
https://github.com/php/php-src/commit/a3e6b50442db106d354931ecaa0284a200609be6
Previous Comments:
------------------------------------------------------------------------
[2019-07-16 07:15:42] a at ustimen dot co
Description:
------------
Under phpdbg 7.2.20 include unexistent file results to fatal error/memory exhausted.
Under phpdbg 7.2.19 include unexistent file works as expected.
Test script:
---------------
echo '<?php include "unexistent";' | docker run -i php:7.2.20 phpdbg -qrr -s
''
[PHP Warning: include(unexistent): failed to open stream: No such file or directory in Standard
input code on line 1]
[PHP Warning: include(): Failed opening 'unexistent' for inclusion
(include_path='.:/usr/local/lib/php') in Standard input code on line 1]
[PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
2305843009750564865 bytes) in Standard input code on line 1]
echo '<?php include "unexistent";' | docker run -i php:7.2.19 phpdbg -qrr -s
''
[PHP Warning: include(unexistent): failed to open stream: No such file or directory in Standard
input code on line 1]
[PHP Warning: include(): Failed opening 'unexistent' for inclusion
(include_path='.:/usr/local/lib/php') in Standard input code on line 1]
Expected result:
----------------
Just two warnings.
Actual result:
--------------
Two warnings and fatal about memory.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78297&edit=1