File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -3282,6 +3282,7 @@ static zend_result accel_post_startup(void)
32823282 zend_accel_error_noreturn (ACCEL_LOG_FATAL , "Could not enable JIT: could not use reserved buffer!" );
32833283 } else {
32843284 zend_jit_startup (ZSMMG (reserved ), jit_size , reattached );
3285+ zend_jit_startup_ok = true;
32853286 }
32863287 }
32873288#endif
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ zend_jit_globals jit_globals;
6969#define JIT_STUB_PREFIX "JIT$$"
7070#define TRACE_PREFIX "TRACE-"
7171
72+ bool zend_jit_startup_ok = false;
73+
7274zend_ulong zend_jit_profile_counter = 0 ;
7375int zend_jit_profile_counter_rid = -1 ;
7476
@@ -3772,6 +3774,13 @@ static void zend_jit_reset_counters(void)
37723774
37733775void zend_jit_activate (void )
37743776{
3777+ #ifdef ZTS
3778+ if (!zend_jit_startup_ok ) {
3779+ JIT_G (enabled ) = 0 ;
3780+ JIT_G (on ) = 0 ;
3781+ return ;
3782+ }
3783+ #endif
37753784 zend_jit_profile_counter = 0 ;
37763785 if (JIT_G (on )) {
37773786 if (JIT_G (trigger ) == ZEND_JIT_ON_HOT_COUNTERS ) {
Original file line number Diff line number Diff line change @@ -100,6 +100,8 @@ typedef struct _zend_jit_trace_rec zend_jit_trace_rec;
100100typedef struct _zend_jit_trace_stack_frame zend_jit_trace_stack_frame ;
101101typedef struct _sym_node zend_sym_node ;
102102
103+ extern bool zend_jit_startup_ok ;
104+
103105typedef struct _zend_jit_globals {
104106 bool enabled ;
105107 bool on ;
You can’t perform that action at this time.
0 commit comments