]> granicus.if.org Git - php/commitdiff
Fixed opcahce_reset() crash when opcache.protect_memory is set
authorDmitry Stogov <dmitry@zend.com>
Tue, 26 Nov 2013 17:57:32 +0000 (21:57 +0400)
committerDmitry Stogov <dmitry@zend.com>
Tue, 26 Nov 2013 17:57:32 +0000 (21:57 +0400)
ext/opcache/ZendAccelerator.c

index b2efce9ea20943e222ebe224752325fedaf89b2e..c0edf7e4774d0d4c7faf86ae9d4f2616d5e21b5e 100644 (file)
@@ -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 */