[php-src] master: Fix TLS access in JIT with Musl (#13927)
| From: | Arnaud Le Blanc via GitHub | Date: | Thu, 11 Apr 2024 11:35:00 +0000 |
| Subject: | [php-src] master: Fix TLS access in JIT with Musl (#13927) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-128073@lists.php.net to get a copy of this message | ||
Author: Arnaud Le Blanc (arnaud-lb)
Committer: GitHub (web-flow)
Pusher: arnaud-lb
Date: 2024-04-11T13:34:54+02:00
Commit: https://github.com/php/php-src/commit/91b84571f01b78e344df1557442dd19493db16d6
Raw diff: https://github.com/php/php-src/commit/91b84571f01b78e344df1557442dd19493db16d6.diff
Fix TLS access in JIT with Musl (#13927)
ABI specifies that each DTV element is 8 bytes in size on x86-64. The factor 16
was defined in 71cccc0bcc5f083ae6022face1c2514b5240b96a, but it's probably
a merge error of 94ba883e195613d5a01be07b6ca9a73024b5575b, which used the right
value.
Changed paths:
M ext/opcache/jit/zend_jit_ir.c
Diff:
diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c
index 4f1d81c4d07b..18bcbbd14115 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;