mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fixed bug #71470
Don't report hashtable iterator leaks on unclean shutdown, those are expected.
This commit is contained in:
1
NEWS
1
NEWS
@@ -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
13
Zend/tests/bug71470.phpt
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user