diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-02-15 10:32:50 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-02-15 10:32:50 +0800 |
commit | 8974e4c7814eb0ca6e6f00fcd8d9df9d62283d59 (patch) | |
tree | 67719a8d19d68d016e0c881663f929999a0597ed | |
parent | 1740648312f3d87ef0086d94621ebf803af46ec6 (diff) | |
parent | 2b850e1565d69ff9e0e855a86f1b8662b827c55e (diff) | |
download | php-git-8974e4c7814eb0ca6e6f00fcd8d9df9d62283d59.tar.gz |
Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
Update NEWS: "Fixed bug #71584 (Possible use-after-free of ZCG(cwd) in Zend Opcache)"
Fix use-after-free of ZCG(cwd) in Zend Optimizer
Conflicts:
ext/opcache/ZendAccelerator.c
-rw-r--r-- | ext/opcache/ZendAccelerator.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 2440a56582..f0dc770109 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -2284,6 +2284,11 @@ static void accel_deactivate(void) * the script is aborted abnormally, they may become messed up. */ + if (ZCG(cwd)) { + zend_string_release(ZCG(cwd)); + ZCG(cwd) = NULL; + } + if (!ZCG(enabled) || !accel_startup_ok) { return; } @@ -2297,12 +2302,6 @@ static void accel_deactivate(void) zend_accel_fast_shutdown(); } #endif - - if (ZCG(cwd)) { - zend_string_release(ZCG(cwd)); - ZCG(cwd) = NULL; - } - } static int accelerator_remove_cb(zend_extension *element1, zend_extension *element2) |