mirror of
https://github.com/php/php-src.git
synced 2024-11-23 01:44:06 +08:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-16851: JIT_G(enabled) not set correctly on other threads
This commit is contained in:
commit
58ed759ba7
2
NEWS
2
NEWS
@ -34,6 +34,8 @@ PHP NEWS
|
||||
- Opcache:
|
||||
. Fixed bug GH-16770 (Tracing JIT type mismatch when returning UNDEF).
|
||||
(nielsdos, Dmitry)
|
||||
. Fixed bug GH-16851 (JIT_G(enabled) not set correctly on other threads).
|
||||
(dktapps)
|
||||
|
||||
- OpenSSL:
|
||||
. Prevent unexpected array entry conversion when reading key. (nielsdos)
|
||||
|
@ -3258,6 +3258,8 @@ static zend_result accel_post_startup(void)
|
||||
if (JIT_G(buffer_size) != 0) {
|
||||
zend_accel_error(ACCEL_LOG_WARNING, "Could not enable JIT!");
|
||||
}
|
||||
} else {
|
||||
zend_jit_startup_ok = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -103,6 +103,8 @@ typedef struct _zend_jit_stub {
|
||||
#define JIT_STUB(name, offset, adjustment) \
|
||||
{JIT_STUB_PREFIX #name, zend_jit_ ## name ## _stub, offset, adjustment}
|
||||
|
||||
bool zend_jit_startup_ok = false;
|
||||
|
||||
zend_ulong zend_jit_profile_counter = 0;
|
||||
int zend_jit_profile_counter_rid = -1;
|
||||
|
||||
@ -5104,6 +5106,13 @@ static void zend_jit_reset_counters(void)
|
||||
|
||||
ZEND_EXT_API void zend_jit_activate(void)
|
||||
{
|
||||
#ifdef ZTS
|
||||
if (!zend_jit_startup_ok) {
|
||||
JIT_G(enabled) = 0;
|
||||
JIT_G(on) = 0;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
zend_jit_profile_counter = 0;
|
||||
if (JIT_G(on)) {
|
||||
if (JIT_G(trigger) == ZEND_JIT_ON_HOT_COUNTERS) {
|
||||
|
@ -90,6 +90,8 @@ typedef struct _zend_jit_trace_rec zend_jit_trace_rec;
|
||||
typedef struct _zend_jit_trace_stack_frame zend_jit_trace_stack_frame;
|
||||
typedef struct _sym_node zend_sym_node;
|
||||
|
||||
extern bool zend_jit_startup_ok;
|
||||
|
||||
typedef struct _zend_jit_globals {
|
||||
bool enabled;
|
||||
bool on;
|
||||
|
Loading…
Reference in New Issue
Block a user