From b040ea81858461354a6b8b9cda8df9d4f0f1164b Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Mon, 8 Apr 2024 20:54:21 +0200 Subject: [PATCH] Fix TLS access in JIT with Musl ABI specifies that each DTV element is 8 bytes in size on x86-64. The factor 16 was defined in from 71cccc0bcc5f083ae6022face1c2514b5240b96a, but it's probably a merge error of 94ba883e195613d5a01be07b6ca9a73024b5575b, which used the right value. --- ext/opcache/jit/zend_jit_ir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c index 7c35481e1a414..13db11230b734 100644 --- a/ext/opcache/jit/zend_jit_ir.c +++ b/ext/opcache/jit/zend_jit_ir.c @@ -3255,7 +3255,7 @@ static void zend_jit_setup(void) "leaq _tsrm_ls_cache@tlsgd(%%rip), %0\n" : "=a" (ti)); tsrm_tls_offset = ti[1]; - tsrm_tls_index = ti[0] * 16; + tsrm_tls_index = ti[0] * 8; #else size_t *ti;