]> granicus.if.org Git - php/commitdiff
Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT)
authorDmitry Stogov <dmitry@zend.com>
Thu, 14 Jan 2021 05:16:27 +0000 (08:16 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 14 Jan 2021 05:16:27 +0000 (08:16 +0300)
NEWS
ext/opcache/jit/zend_jit_trace.c

diff --git a/NEWS b/NEWS
index d27f9b34c8fdeca70eb90a9232f595cbcfb4a70b..60172e52e292e4a4a0b84b7fe65363978749073c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,10 @@ PHP                                                                        NEWS
 - ODBC:
   . Fixed bug #80592 (all floats are the same in ODBC parameters). (cmb)
 
+- Opcache:
+  . Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT).
+    (Dmitry)
+
 - PDO_Firebird:
   . Fixed bug #80521 (Parameters with underscores no longer recognized). (cmb,
     Simonov Denis)
index 853be7517a62bb023cdf4c554b7515a628d4ea5e..69c4f79fa87352c95ad4bfd10f27c7baeac4248e 100644 (file)
@@ -7629,6 +7629,11 @@ static void zend_jit_trace_init_caches(void)
 static void zend_jit_trace_reset_caches(void)
 {
        JIT_G(tracing) = 0;
+#ifdef ZTS
+       if (!JIT_G(exit_counters)) {
+               JIT_G(exit_counters) = calloc(JIT_G(max_exit_counters), 1);
+       }
+#endif
 }
 
 static void zend_jit_trace_restart(void)