]> granicus.if.org Git - php/commitdiff
Fix #80175: PHP8 RC1 - JIT Buffer not working
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 3 Oct 2020 15:02:24 +0000 (17:02 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 10 Oct 2020 15:46:59 +0000 (17:46 +0200)
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
ext/opcache/ZendAccelerator.c

diff --git a/NEWS b/NEWS
index 64a2b0fa7a782d8fae85aaa5b891a810c1c86f7a..5b1161098421b0e633a18fb0e07ba02e79fa3f11 100644 (file)
--- 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
index 340c19764f46d942d87f9f2b5dd033a45a934ebc..06e171b179b84148c41dadfe7b23af4b20a1924f 100644 (file)
@@ -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();