Bug #79947 [Asn->Csd]: Memory leak on invalid offset type in compound assignment

From: Date: Mon, 10 Aug 2020 08:14:01 +0000
Subject: Bug #79947 [Asn->Csd]: Memory leak on invalid offset type in compound assignment
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228477@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79947&edit=1 ID: 79947 Updated by: nikic@php.net Reported by: changochen1 at gmail dot com Summary: Memory leak on invalid offset type in compound assignment -Status: Assigned +Status: Closed Type: Bug Package: Scripting Engine problem PHP Version: 8.0Git-2020-08-09 (Git) Assigned To: nikic Block user comment: N Private report: N New Comment: Automatic comment on behalf of nikita.ppv@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=2d087210ebb8adc06dcaca37b9d2dcb93ea2156c Log: Fixed bug #79947 Previous Comments: ------------------------------------------------------------------------ [2020-08-09 21:20:26] changochen1 at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=79947&edit=1

« previous php.bugs (#228477) next »