com php-src: Revert "Fixed bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev)": NEWS ext/standard/basic_fun ctions.c
ext/standard/tests/general_functions/bug70 249.phpt
| From: | Xinchen Hui | Date: | Wed, 11 Nov 2015 04:06:38 +0000 |
| Subject: | com php-src: Revert "Fixed bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev)": NEWS ext/standard/basic_fun ctions.c ext/standard/tests/general_functions/bug70 249.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89738@lists.php.net to get a copy of this message | ||
Commit: c3260b66c9723d63c75f4f63aa2b9f52c6915d6f
Author: Xinchen Hui <laruence@gmail.com> Wed, 11 Nov 2015 12:06:38 +0800
Parents: d6c527830e57c85356916e2efc2e6f120d493051
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c3260b66c9723d63c75f4f63aa2b9f52c6915d6f
Log:
Revert "Fixed bug #70249 (Segmentation fault while running PHPUnit tests on phpBB
3.2-dev)"
This reverts commit d6c527830e57c85356916e2efc2e6f120d493051.
Bugs:
https://bugs.php.net/70249
Changed paths:
M NEWS
M ext/standard/basic_functions.c
D ext/standard/tests/general_functions/bug70249.phpt
Diff:
diff --git a/NEWS b/NEWS
index 3ebc7de..6a88338 100644
--- a/NEWS
+++ b/NEWS
@@ -2,10 +2,6 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2015, PHP 7..0.1
-- Standard:
- . Fixed bug #70249 (Segmentation fault while running PHPUnit tests on
- phpBB 3.2-dev). (Laruence)
-
- Streams/Socket
. Add IPV6_V6ONLY constant / make it usable in stream contexts. (Bob)
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 1c5f3fe..8da45c4 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -5002,16 +5002,9 @@ PHPAPI void php_call_shutdown_functions(void) /* {{{ */
{
if (BG(user_shutdown_function_names)) {
zend_try {
- zval *entry;
- for (zend_hash_internal_pointer_reset(BG(user_shutdown_function_names));
- zend_hash_has_more_elements(BG(user_shutdown_function_names)) == SUCCESS;
- zend_hash_move_forward(BG(user_shutdown_function_names))) {
- if ((entry = zend_hash_get_current_data(BG(user_shutdown_function_names))) == NULL) {
- continue;
- }
- user_shutdown_function_call(entry);
- }
- } zend_end_try();
+ zend_hash_apply(BG(user_shutdown_function_names), user_shutdown_function_call);
+ }
+ zend_end_try();
php_free_shutdown_functions();
}
}
diff --git a/ext/standard/tests/general_functions/bug70249.phpt
b/ext/standard/tests/general_functions/bug70249.phpt
deleted file mode 100644
index aed8dcc..0000000
--- a/ext/standard/tests/general_functions/bug70249.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-Bug #70249 (Segmentation fault while running PHPUnit tests on phpBB 3.2-dev)
---FILE--
-<?php
-
-class Logger {
- public function __construct() {
- register_shutdown_function(function () {
- // make regular flush before other shutdown functions, which allows session data
collection and so on
- $this->flush();
- // make sure log entries written by shutdown functions are also flushed
- // ensure "flush()" is called last when there are multiple shutdown functions
- register_shutdown_function([$this, 'flush'], true);
- });
- }
-
- public function flush($final = false) {
- return 1;
- }
-}
-
-for ($i = 0; $i < 200; $i++) {
- $a = new Logger();
-}
-?>
-okey
---EXPECT--
-okey