Bug #78297 [NEW]: Include unexistent file memory leak
| From: | a at ustimen dot co | Date: | Tue, 16 Jul 2019 07:15:42 +0000 |
| Subject: | Bug #78297 [NEW]: Include unexistent file memory leak | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-221802@lists.php.net to get a copy of this message | ||
From: a at ustimen dot co
Operating system: Linux
PHP version: 7.2.20
Package: phpdbg
Bug Type: Bug
Bug description:Include unexistent file memory leak
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 bug report at https://bugs.php.net/bug.php?id=78297&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78297&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78297&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78297&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=78297&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78297&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78297&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78297&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78297&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78297&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78297&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78297&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78297&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78297&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78297&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=78297&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78297&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78297&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78297&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78297&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78297&r=mysqlcfg