summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2021-01-14 08:16:27 +0300
committerDmitry Stogov <dmitry@zend.com>2021-01-14 08:16:27 +0300
commit3edf5c969a9f5f3290852ab9edf61a876fca63d0 (patch)
treeb7311a301c059f8567fd1815969699d6345b0a3f
parent41e9a8ebdca3a94cc7da933dc10df058c50ac8bb (diff)
downloadphp-git-3edf5c969a9f5f3290852ab9edf61a876fca63d0.tar.gz
Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT)
-rw-r--r--NEWS4
-rw-r--r--ext/opcache/jit/zend_jit_trace.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index d27f9b34c8..60172e52e2 100644
--- 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)
diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c
index 853be7517a..69c4f79fa8 100644
--- a/ext/opcache/jit/zend_jit_trace.c
+++ b/ext/opcache/jit/zend_jit_trace.c
@@ -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)