Merge branch 'PHP-5.5' into PHP-5.6
authorStanislav Malyshev <stas@php.net>
Mon, 1 Sep 2014 19:19:31 +0000 (12:19 -0700)
committerStanislav Malyshev <stas@php.net>
Mon, 1 Sep 2014 19:20:34 +0000 (12:20 -0700)
* PHP-5.5:
  update NEWS
  Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
  Fix typo from commit 32314f6b6
  Fix destruction order in zend_shutdown (bug #65463, #66036)

1  2 
NEWS
Zend/zend.c
Zend/zend_compile.h
Zend/zend_execute_API.c

diff --cc NEWS
index 9777c0afc2a557cdf0dce859375127ca0f382730,3b7a382038abc9dc2f498ceffec2bd78e9ed2cff..5d5e04e8a88d37bbb1defeb1a6ce3ecbcf224a72
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -1,49 -1,12 +1,52 @@@
  PHP                                                                        NEWS
  |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 -?? ??? 2014, PHP 5.5.17
 +
 +?? ??? 2014, PHP 5.6.1
  
  - Core:
 -  . Fixed bug #47358 (glob returns error, should be empty array()). (Pierre)
++  . Implemented FR #38409 (parse_ini_file() looses the type of booleans). (Tjerk)
+   . Fixed bug #65463 (SIGSEGV during zend_shutdown()). (Keyur Govande)
+   . Fixed bug #66036 (Crash on SIGTERM in apache process). (Keyur Govande)
    . Fixed bug #67878 (program_prefix not honoured in man pages). (Remi)
-   . Implemented FR #38409 (parse_ini_file() looses the type of booleans). (Tjerk)
 +  . Fixed bug #67938 (Segfault when extending interface method with variadic).
 +    (Nikita)
++
 +
 +- Fileinfo:
 +  . Fixed bug #67731 (finfo::file() returns invalid mime type
 +    for binary files). (Anatol)
 +
 +- GD:
 +  . Made fontFetch's path parser thread-safe. (Sara)
 +
 +- GMP:
 +  . Fixed bug #67917 (Using GMP objects with overloaded operators can cause
 +    memory exhaustion). (Nikita)
 +
 +- MySQLi:
 +  . Fixed bug #67839 (mysqli does not handle 4-byte floats correctly). (Keyur)
 +
 +- OpenSSL:
 +  . Fixed bug #67850 (extension won't build if openssl compiled without SSLv3).
 +    (Daniel Lowrey)
 +
 +28 Aug 2014, PHP 5.6.0
 +
 +- Apache2 Handler SAPI:
 +  . Fixed Apache log issue caused by APR's lack of support for %zu
 +    (APR issue https://issues.apache.org/bugzilla/show_bug.cgi?id=56120).
 +    (Jeff Trawick)
 +
 +- CLI server:
 +  . Added some MIME types to the CLI web server. (Chris Jones)
 +  . Fixed bug #67079 (Missing MIME types for XML/XSL files). (Anatol)
 +  . Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
 +    (Adam)
 +  . Fixed bug #67594 (Unable to access to apache_request_headers() elements).
 +    (Tjerk)
 +  . Implemented FR #67429 (CLI server is missing some new HTTP response codes).
 +    (Adam)
 +  . Fixed Bug #67406 (built-in web-server segfaults on startup). (Remi)
  
  - COM:
    . Fixed bug #41577 (DOTNET is successful once per server run)
diff --cc Zend/zend.c
index 34dcc75469596f770a33a2ffd522497698622875,cb5c39ba8d9656c2b86e24236d72444c1c768022..891928359d165896158285f8baa8841f9f341b80
@@@ -822,11 -814,22 +822,25 @@@ void zend_shutdown(TSRMLS_D) /* {{{ *
        zend_shutdown_timeout_thread();
  #endif
        zend_destroy_rsrc_list(&EG(persistent_list) TSRMLS_CC);
+       if (EG(active))
+       {
+               /*
+                * The order of destruction is important here.
+                * See bugs #65463 and 66036.
+                */
+               zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
+               zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) zend_cleanup_user_class_data TSRMLS_CC);
+               zend_cleanup_internal_classes(TSRMLS_C);
+               zend_hash_reverse_apply(GLOBAL_FUNCTION_TABLE, (apply_func_t) clean_non_persistent_function_full TSRMLS_CC);
+               zend_hash_reverse_apply(GLOBAL_CLASS_TABLE, (apply_func_t) clean_non_persistent_class_full TSRMLS_CC);
+       }
        zend_destroy_modules();
  
 +      virtual_cwd_deactivate(TSRMLS_C);
 +      virtual_cwd_shutdown();
 +
        zend_hash_destroy(GLOBAL_FUNCTION_TABLE);
        zend_hash_destroy(GLOBAL_CLASS_TABLE);
  
Simple merge
Simple merge