From 7067a4d8a965983f22243beb364ffbb71e955033 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 10 Oct 2023 17:11:01 +0200 Subject: [PATCH 1/4] Report error if JIT cannot be enabled --- ext/opcache/ZendAccelerator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 429eadf023eb0..048b42217de3c 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3270,6 +3270,8 @@ static zend_result accel_post_startup(void) || zend_jit_startup(ZSMMG(reserved), jit_size, reattached) != SUCCESS) { JIT_G(enabled) = 0; JIT_G(on) = 0; + zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Could not enable JIT!"); + return SUCCESS; } } #endif From 9652743e07ec418bbdb75368f7000d72802517ec Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 10 Oct 2023 17:46:04 +0200 Subject: [PATCH 2/4] Fixup --- ext/opcache/ZendAccelerator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 048b42217de3c..413ba739dc838 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3271,7 +3271,6 @@ static zend_result accel_post_startup(void) JIT_G(enabled) = 0; JIT_G(on) = 0; zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Could not enable JIT!"); - return SUCCESS; } } #endif From 78948926d281ebffd1837fd64dc005d115e9e2ac Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 10 Oct 2023 17:47:05 +0200 Subject: [PATCH 3/4] Improve level --- ext/opcache/ZendAccelerator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 413ba739dc838..73632875ffab4 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3270,7 +3270,7 @@ static zend_result accel_post_startup(void) || zend_jit_startup(ZSMMG(reserved), jit_size, reattached) != SUCCESS) { JIT_G(enabled) = 0; JIT_G(on) = 0; - zend_accel_error_noreturn(ACCEL_LOG_FATAL, "Could not enable JIT!"); + zend_accel_error_noreturn(ACCEL_LOG_WARNING, "Could not enable JIT!"); } } #endif From 9e98de619318bebe0e3404ad54e86d3c6d5de77e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 10 Oct 2023 18:00:59 +0200 Subject: [PATCH 4/4] Update ext/opcache/ZendAccelerator.c Co-authored-by: Ilija Tovilo --- ext/opcache/ZendAccelerator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 73632875ffab4..93afd8e415dc5 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3270,7 +3270,7 @@ static zend_result accel_post_startup(void) || zend_jit_startup(ZSMMG(reserved), jit_size, reattached) != SUCCESS) { JIT_G(enabled) = 0; JIT_G(on) = 0; - zend_accel_error_noreturn(ACCEL_LOG_WARNING, "Could not enable JIT!"); + zend_accel_error(ACCEL_LOG_WARNING, "Could not enable JIT!"); } } #endif