mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Avoid JIT warning with opcache.jit_buffer_size=0
This commit is contained in:
commit
b49e178563
@ -3278,7 +3278,11 @@ static zend_result accel_post_startup(void)
|
||||
|| zend_jit_startup(ZSMMG(reserved), jit_size, reattached) != SUCCESS) {
|
||||
JIT_G(enabled) = 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
|
||||
|
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…
Reference in New Issue
Block a user