1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3'

* PHP-8.3:
  Fix enabling of JIT at runtime
This commit is contained in:
Ilija Tovilo
2024-05-22 14:33:33 +02:00
3 changed files with 34 additions and 3 deletions

View File

@@ -3364,12 +3364,12 @@ ZEND_EXT_API int zend_jit_config(zend_string *jit, int stage)
return FAILURE;
}
if (ZSTR_LEN(jit) == 0
|| zend_string_equals_literal_ci(jit, "disable")) {
if (zend_string_equals_literal_ci(jit, "disable")) {
JIT_G(enabled) = 0;
JIT_G(on) = 0;
return SUCCESS;
} else if (zend_string_equals_literal_ci(jit, "0")
} else if (ZSTR_LEN(jit) == 0
|| zend_string_equals_literal_ci(jit, "0")
|| zend_string_equals_literal_ci(jit, "off")
|| zend_string_equals_literal_ci(jit, "no")
|| zend_string_equals_literal_ci(jit, "false")) {

View File

@@ -0,0 +1,16 @@
--TEST--
GH-14267: JIT cannot be enabled at runtime
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.jit=off
opcache.jit_buffer_size=32M
--EXTENSIONS--
opcache
--FILE--
<?php
ini_set('opcache.jit', 'tracing');
?>
===DONE===
--EXPECT--
===DONE===

View File

@@ -0,0 +1,15 @@
--TEST--
GH-14267: JIT cannot be enabled at runtime
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.jit=disable
opcache.jit_buffer_size=32M
--EXTENSIONS--
opcache
--FILE--
<?php
ini_set('opcache.jit', 'tracing');
?>
--EXPECTF--
Warning: Cannot change opcache.jit setting at run-time (JIT is disabled) in %s on line %d