From b44ad27a7828db6e2699fd56184d056e349d2f3b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 6 Jul 2024 21:39:32 +0200 Subject: [PATCH] Fix GH-14550: No warning message when Zend DTrace is enabled that opcache.jit is implictly disabled Closes GH-14847. --- NEWS | 4 ++++ ext/opcache/jit/zend_jit.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 9c6a61c6248..75d98e0b536 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,10 @@ PHP NEWS - LibXML: . Fixed bug GH-14563 (Build failure with libxml2 v2.13.0). (nielsdos) +- Opcache: + . Fixed bug GH-14550 (No warning message when Zend DTrace is enabled that + opcache.jit is implictly disabled). (nielsdos) + - Output: . Fixed bug GH-14808 (Unexpected null pointer in Zend/zend_string.h with empty output buffer). (nielsdos) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 7ff691b3c9b..ce091509785 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -4877,7 +4877,9 @@ ZEND_EXT_API int zend_jit_check_support(void) } if (zend_execute_ex != execute_ex) { - if (strcmp(sapi_module.name, "phpdbg") != 0) { + if (zend_dtrace_enabled) { + zend_error(E_WARNING, "JIT is incompatible with DTrace. JIT disabled."); + } else if (strcmp(sapi_module.name, "phpdbg") != 0) { zend_error(E_WARNING, "JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled."); } JIT_G(enabled) = 0;