mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix enabling of JIT at runtime
This commit is contained in:
4
NEWS
4
NEWS
@@ -2,6 +2,10 @@ PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? ????, PHP 8.3.9
|
||||
|
||||
- Opcache:
|
||||
. Fixed bug GH-14267 (opcache.jit=off does not allow enabling JIT at runtime).
|
||||
(ilutov)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug GH-14290 (Member access within null pointer in extension spl).
|
||||
(nielsdos)
|
||||
|
||||
@@ -4803,12 +4803,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")) {
|
||||
|
||||
16
ext/opcache/tests/jit/gh14267_001.phpt
Normal file
16
ext/opcache/tests/jit/gh14267_001.phpt
Normal 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===
|
||||
15
ext/opcache/tests/jit/gh14267_002.phpt
Normal file
15
ext/opcache/tests/jit/gh14267_002.phpt
Normal 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
|
||||
Reference in New Issue
Block a user