Skip to content

Commit 834eaae

Browse files
committed
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fixed opcahce_reset() crash when opcache.protect_memory is set
2 parents 19f0e18 + de65817 commit 834eaae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2734,6 +2734,7 @@ void zend_accel_schedule_restart(zend_accel_restart_reason reason TSRMLS_DC)
27342734
}
27352735
zend_accel_error(ACCEL_LOG_DEBUG, "Restart Scheduled!");
27362736

2737+
SHM_UNPROTECT();
27372738
ZCSG(restart_pending) = 1;
27382739
ZCSG(restart_reason) = reason;
27392740
ZCSG(cache_status_before_restart) = ZCSG(accelerator_enabled);
@@ -2744,6 +2745,7 @@ void zend_accel_schedule_restart(zend_accel_restart_reason reason TSRMLS_DC)
27442745
} else {
27452746
ZCSG(force_restart_time) = 0;
27462747
}
2748+
SHM_PROTECT();
27472749
}
27482750

27492751
/* this is needed because on WIN32 lock is not decreased unless ZCG(counted) is set */

0 commit comments

Comments
 (0)