git: 62bc41c614ec - stable/13 - rtld: fix allocate_module_tls() variant I fallback to static allocation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 Jun 2023 23:40:22 UTC
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=62bc41c614ece3fa32010a92cb57738303795666
commit 62bc41c614ece3fa32010a92cb57738303795666
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-06-09 00:51:32 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-06-11 23:39:43 +0000
rtld: fix allocate_module_tls() variant I fallback to static allocation
(cherry picked from commit e9a38ed2fa61fd264a80f24ceb35f39b0ac6463d)
---
libexec/rtld-elf/rtld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 017833164a18..91b09b5fbd25 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -5511,7 +5511,7 @@ allocate_module_tls(int index)
if (obj->tls_static) {
#ifdef TLS_VARIANT_I
- p = (char *)_tcb_get() + obj->tlsoffset;
+ p = (char *)_tcb_get() + obj->tlsoffset + TLS_TCB_SIZE;
#else
p = (char *)_tcb_get() - obj->tlsoffset;
#endif