com php-src: Fixed opcahce_reset() crash when opcac he.protect_memory is set: ext/opcache/ZendAccelerat or.c
| From: | Dmitry Stogov | Date: | Tue, 26 Nov 2013 17:57:32 +0000 |
| Subject: | com php-src: Fixed opcahce_reset() crash when opcac he.protect_memory is set: ext/opcache/ZendAccelerat or.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74064@lists.php.net to get a copy of this message | ||
Commit: de658171360cc480105eaf932f94c15b24687a83
Author: Dmitry Stogov <dmitry@zend.com> Tue, 26 Nov 2013 21:57:32 +0400
Parents: 2381b817aa850f08e67e338ec4a430b01d935e88
Branches: PHP-5.5 PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=de658171360cc480105eaf932f94c15b24687a83
Log:
Fixed opcahce_reset() crash when opcache.protect_memory is set
Changed paths:
M ext/opcache/ZendAccelerator.c
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index b2efce9..c0edf7e 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2730,6 +2730,7 @@ void zend_accel_schedule_restart(zend_accel_restart_reason reason TSRMLS_DC)
}
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled!");
+ SHM_UNPROTECT();
ZCSG(restart_pending) = 1;
ZCSG(restart_reason) = reason;
ZCSG(cache_status_before_restart) = ZCSG(accelerator_enabled);
@@ -2740,6 +2741,7 @@ void zend_accel_schedule_restart(zend_accel_restart_reason reason TSRMLS_DC)
} else {
ZCSG(force_restart_time) = 0;
}
+ SHM_PROTECT();
}
/* this is needed because on WIN32 lock is not decreased unless ZCG(counted) is set */