Commit: 3550f3d0aad6e979e2a6fe3ee40d4fbff168c34b Author: Dmitry Stogov <dmi...@zend.com> Tue, 30 Jul 2013 17:35:19 +0400 Parents: ae5e70afac265e6b113d7995bb10479ee2565aba Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3550f3d0aad6e979e2a6fe3ee40d4fbff168c34b Log: Fixed bug #65338 (Enabling both php_opcache and php_wincache AVs on shutdown). Bugs: https://bugs.php.net/65338 Changed paths: M NEWS M ext/opcache/ZendAccelerator.c M ext/opcache/ZendAccelerator.h M ext/opcache/zend_accelerator_module.c Diff: diff --git a/NEWS b/NEWS index 57b523e..d21126d 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,10 @@ PHP NEWS . Fixed bug #65291 (get_defined_constants() causes PHP to crash in a very limited case). (Arpad) +- OPcahce: + . Fixed bug #65338 (Enabling both php_opcache and php_wincache AVs on + shutdown). (Dmitry) + - PDO_mysql: . Fixed bug #65299 (pdo mysql parsing errors). (Johannes) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 76a3320..b5474c0 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2656,12 +2656,9 @@ static void accel_free_ts_resources() #endif } -static void accel_shutdown(zend_extension *extension) +void accel_shutdown(TSRMLS_D) { zend_ini_entry *ini_entry; - TSRMLS_FETCH(); - - (void)extension; /* keep the compiler happy */ zend_accel_blacklist_shutdown(&accel_blacklist); @@ -2679,6 +2676,11 @@ static void accel_shutdown(zend_extension *extension) } #if ZEND_EXTENSION_API_NO > PHP_5_3_X_API_NO +# ifndef ZTS + zend_hash_clean(CG(function_table)); + zend_hash_clean(CG(class_table)); + zend_hash_clean(EG(zend_constants)); +# endif CG(interned_strings_start) = orig_interned_strings_start; CG(interned_strings_end) = orig_interned_strings_end; zend_new_interned_string = orig_new_interned_string; @@ -2768,7 +2770,7 @@ ZEND_EXT_API zend_extension zend_extension_entry = { "http://www.zend.com/", /* URL */ "Copyright (c) 1999-2013", /* copyright */ accel_startup, /* startup */ - accel_shutdown, /* shutdown */ + NULL, /* shutdown */ accel_activate, /* per-script activation */ accel_deactivate, /* per-script deactivation */ NULL, /* message handler */ diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 5f414f2..57e2e7a 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -316,6 +316,7 @@ extern zend_accel_globals accel_globals; extern char *zps_api_failure_reason; +void accel_shutdown(TSRMLS_D); void zend_accel_schedule_restart(zend_accel_restart_reason reason TSRMLS_DC); void zend_accel_schedule_restart_if_necessary(zend_accel_restart_reason reason TSRMLS_DC); int zend_accel_invalidate(const char *filename, int filename_len, zend_bool force TSRMLS_DC); diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index fa4e3d8..2287d13 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -378,6 +378,7 @@ static ZEND_MSHUTDOWN_FUNCTION(zend_accelerator) (void)type; /* keep the compiler happy */ UNREGISTER_INI_ENTRIES(); + accel_shutdown(TSRMLS_C); return SUCCESS; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php