mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.3'
* PHP-8.3: Avoid JIT warning with opcache.jit_buffer_size=0
This commit is contained in:
commit
81bebef3ee
2 changed files with 21 additions and 1 deletions
|
@ -3253,7 +3253,11 @@ static zend_result accel_post_startup(void)
|
||||||
|| zend_jit_startup(ZSMMG(reserved), jit_size, reattached) != SUCCESS) {
|
|| zend_jit_startup(ZSMMG(reserved), jit_size, reattached) != SUCCESS) {
|
||||||
JIT_G(enabled) = false;
|
JIT_G(enabled) = false;
|
||||||
JIT_G(on) = false;
|
JIT_G(on) = false;
|
||||||
zend_accel_error(ACCEL_LOG_WARNING, "Could not enable JIT!");
|
/* The JIT is implicitly disabled with opcache.jit_buffer_size=0, so we don't want to
|
||||||
|
* emit a warning here. */
|
||||||
|
if (JIT_G(buffer_size) != 0) {
|
||||||
|
zend_accel_error(ACCEL_LOG_WARNING, "Could not enable JIT!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
16
ext/opcache/tests/jit_warning_with_zero_buffer.phpt
Normal file
16
ext/opcache/tests/jit_warning_with_zero_buffer.phpt
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
--TEST--
|
||||||
|
JIT should not emit warning with opcache.jit_buffer_size=0
|
||||||
|
--INI--
|
||||||
|
opcache.enable=1
|
||||||
|
opcache.enable_cli=1
|
||||||
|
opcache.jit=tracing
|
||||||
|
opcache.jit_buffer_size=0
|
||||||
|
opcache.log_verbosity_level=2
|
||||||
|
--EXTENSIONS--
|
||||||
|
opcache
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
var_dump(opcache_get_status()['jit']['enabled'] ?? false);
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
bool(false)
|
Loading…
Add table
Add a link
Reference in a new issue