1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Don't report hashtable iterator leaks on unclean shutdown, those
are expected.
This commit is contained in:
Nikita Popov
2016-02-24 14:07:06 +01:00
parent bb2856b28c
commit d1057cc139
3 changed files with 15 additions and 1 deletions

1
NEWS
View File

@@ -10,6 +10,7 @@ PHP NEWS
. Fixed bug #71596 (Segmentation fault on ZTS with date function
(setlocale)). (Anatol)
. Fixed bug #71535 (Integer overflow in zend_mm_alloc_heap()). (Dmitry)
. Fixed bug #71470 (Leaked 1 hashtable iterators). (Nikita)
- ODBC:
. Fixed bug #47803, #69526 (Executing prepared statements is succesfull only

13
Zend/tests/bug71470.phpt Normal file
View File

@@ -0,0 +1,13 @@
--TEST--
Bug #71470: Leaked 1 hashtable iterators
--FILE--
<?php
$array = [1, 2, 3];
foreach ($array as &$v) {
die("foo\n");
}
?>
--EXPECT--
foo

View File

@@ -398,7 +398,7 @@ void shutdown_executor(void) /* {{{ */
zend_shutdown_fpu();
#ifdef ZEND_DEBUG
if (EG(ht_iterators_used)) {
if (EG(ht_iterators_used) && !CG(unclean_shutdown)) {
zend_error(E_WARNING, "Leaked %" PRIu32 " hashtable iterators", EG(ht_iterators_used));
}
#endif