Skip to content

Commit

Permalink
Fixed opcahce_reset() crash when opcache.protect_memory is set
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Nov 26, 2013
1 parent 2381b81 commit de65817
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/opcache/ZendAccelerator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 */
Expand Down

0 comments on commit de65817

Please sign in to comment.