Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jun 2023 12:14:06 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e9a38ed2fa61 - main - rtld: fix allocate_module_tls() variant I fallback to static allocation
Message-ID:  <202306091214.359CE62w012707@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=e9a38ed2fa61fd264a80f24ceb35f39b0ac6463d

commit e9a38ed2fa61fd264a80f24ceb35f39b0ac6463d
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-06-09 00:51:32 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-06-09 12:13:46 +0000

    rtld: fix allocate_module_tls() variant I fallback to static allocation
    
    Submitted by:   Joerg Sonnenberger
    Fixes:  91880e07f605edb90339685bc934699a4344de3bESC
    MFC after:      1 week
---
 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 72a128ccbb81..173dcd4e9878 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -5465,7 +5465,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306091214.359CE62w012707>