From 2a545ba946033528d38ccfec46fdd592c1eb4857 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 3 Oct 2020 17:02:24 +0200 Subject: [PATCH] Fix #80175: PHP8 RC1 - JIT Buffer not working On Windows, `SUCCESSFULLY_REATTACHED` does not imply that the process has already been properly initialized; thus we must not skip some setup steps in `zend_jit_startup()`. Closes GH-6268. --- NEWS | 1 + ext/opcache/ZendAccelerator.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 64a2b0fa7a..5b11610984 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,7 @@ PHP NEWS - Opcache: . Fixed bug #80184 (Complex expression in while / if statements resolves to false incorrectly). (Nikita) + . Fixed bug #80175 (PHP8 RC1 - JIT Buffer not working). (cmb) - Reflection: . Fixed bug #80190 (ReflectionMethod::getReturnType() does not handle static diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 340c19764f..06e171b179 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3000,7 +3000,7 @@ static zend_result accel_post_startup(void) zend_accel_error(ACCEL_LOG_FATAL, "Failure to initialize shared memory structures - probably not enough shared memory."); return SUCCESS; case SUCCESSFULLY_REATTACHED: -#ifdef HAVE_JIT +#if defined(HAVE_JIT) && !defined(ZEND_WIN32) reattached = 1; #endif zend_shared_alloc_lock(); -- 2.50.1