Bug #76523 [NEW]: PHP Leaks memory when utilizing objects
| From: | mimipim at abv dot bg | Date: | Sun, 24 Jun 2018 15:25:38 +0000 |
| Subject: | Bug #76523 [NEW]: PHP Leaks memory when utilizing objects | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-215952@lists.php.net to get a copy of this message | ||
From: mimipim at abv dot bg
Operating system: CentOS, Debian, Maybe any
PHP version: 7.2.7
Package: Performance problem
Bug Type: Bug
Bug description:PHP Leaks memory when utilizing objects
Description:
------------
I have found that PHP leaks memory simply by creating empty class
object.
The leakage happens only on first initiation of the exact class type,
each next new object will not leak any more.
Test script:
---------------
Check out the live test script: https://3v4l.org/T5qsG
It shows you that after initialization of the fist object and destroying
it the memory is not freed up. Strangely if you uncomment the echo
statement the leakage is not appearing. HHVM reports the same memory in
all cases, just as expected.
Expected result:
----------------
All memory reports to show the same memory usage.
Actual result:
--------------
After the first memory report are following reports of used RAM bigger
than expected.
--
Edit bug report at https://bugs.php.net/bug.php?id=76523&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76523&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76523&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76523&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76523&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76523&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76523&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76523&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76523&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76523&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76523&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76523&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76523&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76523&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76523&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76523&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76523&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76523&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76523&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76523&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76523&r=mysqlcfg