Skip to content

Commit 0793cf5

Browse files
committed
Merge branch 'PHP-8.6'
* PHP-8.6: JIT: Fix TLS access with SHM reattachment (#24355)
2 parents fda3cb0 + 6a663a5 commit 0793cf5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎ext/opcache/jit/zend_jit_ir.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3378,6 +3378,10 @@ static void zend_jit_setup(bool reattached)
33783378
#endif
33793379

33803380
#ifdef ZTS
3381+
# ifdef ZEND_OPCACHE_SHM_REATTACHMENT
3382+
/* Different processes may load TLS variables in a different order, so we
3383+
* can not rely on offsets. We will fallback to runtime resolution. */
3384+
# else
33813385
zend_result result = zend_jit_resolve_tsrm_ls_cache_offsets(
33823386
&tsrm_ls_cache_tcb_offset,
33833387
&tsrm_tls_index,
@@ -3387,6 +3391,7 @@ static void zend_jit_setup(bool reattached)
33873391
zend_accel_error(ACCEL_LOG_INFO,
33883392
"Could not get _tsrm_ls_cache offsets, will fallback to runtime resolution");
33893393
}
3394+
# endif
33903395
#endif
33913396

33923397
#if !defined(ZEND_WIN32) && !defined(IR_TARGET_AARCH64)

0 commit comments

Comments
 (0)