Bug #79947 [NEW]: Memory leak in zend_hash
| From: | changochen1 at gmail dot com | Date: | Sun, 09 Aug 2020 21:20:26 +0000 |
| Subject: | Bug #79947 [NEW]: Memory leak in zend_hash | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-228471@lists.php.net to get a copy of this message | ||
From: changochen1 at gmail dot com
Operating system:
PHP version: 8.0Git-2020-08-09 (Git)
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Memory leak in zend_hash
Description:
------------
We found a bug that leads to memory leak in php interpreter. Here's the
log:
---
~/php-src/bld/sapi/cli/php -f php_poc41.php
Warning: Undefined variable $b in
/home/yongheng/php_commit/php_poc41.php on line 4
Fatal error: Uncaught TypeError: Illegal offset type in
/home/yongheng/php_commit/php_poc41.php:4
Stack trace:
#0 {main}
thrown in /home/yongheng/php_commit/php_poc41.php on line 4
[Sun Aug 9 17:17:48 2020] Script:
'/home/yongheng/php_commit/php_poc41.php'
/home/yongheng/php-src/Zend/zend_hash.c(278) : Freeing
0x00007fddefa58540 (56 bytes),
script=/home/yongheng/php_commit/php_poc41.php
[Sun Aug 9 17:17:48 2020] Script:
'/home/yongheng/php_commit/php_poc41.php'
/home/yongheng/php-src/Zend/zend_hash.c(153) : Freeing
0x00007fddefa5c3c0 (264 bytes),
script=/home/yongheng/php_commit/php_poc41.php
=== Total 2 memory leaks detected ===
---
Test script:
---------------
<?
$a = array () ;
try {
$b [ $a ] -= array ( $a ) ;
}
catch ( c ) { }
--
Edit bug report at https://bugs.php.net/bug.php?id=79947&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79947&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79947&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79947&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79947&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79947&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79947&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79947&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79947&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79947&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79947&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79947&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79947&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79947&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79947&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79947&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79947&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79947&r=mysqlcfg