From: Nikita Popov Date: Wed, 24 Feb 2016 13:07:06 +0000 (+0100) Subject: Fixed bug #71470 X-Git-Tag: php-7.0.5RC1~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1057cc13971e90ea3e7720dc5c82bbc92c4ad23;p=php Fixed bug #71470 Don't report hashtable iterator leaks on unclean shutdown, those are expected. --- diff --git a/NEWS b/NEWS index abc1f6f480..27dfe73832 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 0000000000..6f8b4f0103 --- /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 0c6f0377da..56ad4366ff 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