[Glibc-bsd-commits] r6161 - trunk/glibc-ports-2.25/fbtl
aurel32 at alioth.debian.org
aurel32 at alioth.debian.org
Fri Aug 4 14:08:53 UTC 2017
Author: aurel32
Date: 2017-08-04 14:08:53 +0000 (Fri, 04 Aug 2017)
New Revision: 6161
Modified:
trunk/glibc-ports-2.25/fbtl/allocatestack.c
Log:
Commit missing change from previous commit
Modified: trunk/glibc-ports-2.25/fbtl/allocatestack.c
===================================================================
--- trunk/glibc-ports-2.25/fbtl/allocatestack.c 2017-08-04 13:58:07 UTC (rev 6160)
+++ trunk/glibc-ports-2.25/fbtl/allocatestack.c 2017-08-04 14:08:53 UTC (rev 6161)
@@ -1183,7 +1183,6 @@
static inline void __attribute__((always_inline))
init_one_static_tls (struct pthread *curp, struct link_map *map)
{
- dtv_t *dtv = GET_DTV (TLS_TPADJ (curp));
# if TLS_TCB_AT_TP
void *dest = (char *) curp - map->l_tls_offset;
# elif TLS_DTV_AT_TP
@@ -1192,11 +1191,9 @@
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
# endif
- /* Fill in the DTV slot so that a later LD/GD access will find it. */
- dtv[map->l_tls_modid].pointer.val = dest;
- dtv[map->l_tls_modid].pointer.is_static = true;
-
- /* Initialize the memory. */
+ /* We cannot delay the initialization of the Static TLS area, since
+ it can be accessed with LE or IE, but since the DTV is only used
+ by GD and LD, we can delay its update to avoid a race. */
memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size),
'\0', map->l_tls_blocksize - map->l_tls_initimage_size);
}
More information about the Glibc-bsd-commits
mailing list