Bug #61059 [Opn->Dup]: array_fill leaks if start index is PHP_INT_MAX
| From: | johannes@php.net | Date: | Sat, 11 Feb 2012 20:12:17 +0000 |
| Subject: | Bug #61059 [Opn->Dup]: array_fill leaks if start index is PHP_INT_MAX | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167436@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61059&edit=1
ID: 61059
Updated by: johannes@php.net
Reported by: nikic@php.net
Summary: array_fill leaks if start index is PHP_INT_MAX
-Status: Open
+Status: Duplicate
Type: Bug
Package: *General Issues
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
See #61058
Previous Comments:
------------------------------------------------------------------------
[2012-02-11 19:51:42] nikic@php.net
Description:
------------
<?php array_fill(PHP_INT_MAX, 2, '*')
Leaks:
[Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php'
/home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2371) : Freeing 0xB786F010
(20 bytes), script=reproduceCode4_memoryLeak.php
[Sat Feb 11 20:47:35 2012] Script: 'reproduceCode4_memoryLeak.php'
/home/nikic/dev/php-src-git/Zend/zend_vm_execute.h(2374) : Freeing 0xB7870558
(1 bytes), script=reproduceCode4_memoryLeak.php
/home/nikic/dev/php-src-git/Zend/zend_variables.c(121) : Actual location
(location was relayed)
=== Total 2 memory leaks detected ===
Reason:
zval_add_ref is called regardless of whether zend_hash_next_index_insert
succeeds in
http://lxr.php.net/opengrok/xref/PHP_TRUNK/ext/standard/array.c#1570.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61059&edit=1