diff --git a/NEWS b/NEWS index abc1f6f480d..27dfe738323 100644 --- a/NEWS +++ b/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 diff --git a/Zend/tests/bug71470.phpt b/Zend/tests/bug71470.phpt new file mode 100644 index 00000000000..6f8b4f01033 --- /dev/null +++ b/Zend/tests/bug71470.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #71470: Leaked 1 hashtable iterators +--FILE-- + +--EXPECT-- +foo diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 0c6f0377dab..56ad4366ff8 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -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