summaryrefslogtreecommitdiff
path: root/ext/opcache/jit/zend_jit_trace.c
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 /ext/opcache/jit/zend_jit_trace.c
parent41e9a8ebdca3a94cc7da933dc10df058c50ac8bb (diff)
downloadphp-git-3edf5c969a9f5f3290852ab9edf61a876fca63d0.tar.gz
Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT)
Diffstat (limited to 'ext/opcache/jit/zend_jit_trace.c')
-rw-r--r--ext/opcache/jit/zend_jit_trace.c5
1 files changed, 5 insertions, 0 deletions
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)