Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6-1]: src Pull up following revision(s) (requested by joerg in ti...
details: https://anonhg.NetBSD.org/src/rev/ab915f014347
branches: netbsd-6-1
changeset: 775880:ab915f014347
user: snj <snj%NetBSD.org@localhost>
date: Thu Nov 07 20:32:36 2013 +0000
description:
Pull up following revision(s) (requested by joerg in ticket #976):
libexec/ld.elf_so/tls.c: revision 1.9
tests/lib/libc/tls/dso/h_tls_dlopen.c: revision 1.5
Only initialise TLS space from the PT_TLS segment, if the size is
positive and the offset has been computed. Fixes PR lib/48324.
diffstat:
libexec/ld.elf_so/tls.c | 6 +++---
tests/lib/libc/tls/dso/h_tls_dlopen.c | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r d58e55631b71 -r ab915f014347 libexec/ld.elf_so/tls.c
--- a/libexec/ld.elf_so/tls.c Thu Nov 07 20:19:40 2013 +0000
+++ b/libexec/ld.elf_so/tls.c Thu Nov 07 20:32:36 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $ */
+/* $NetBSD: tls.c,v 1.7.18.1 2013/11/07 20:32:36 snj Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: tls.c,v 1.7 2011/04/23 16:40:08 joerg Exp $");
+__RCSID("$NetBSD: tls.c,v 1.7.18.1 2013/11/07 20:32:36 snj Exp $");
#include <sys/param.h>
#include <sys/ucontext.h>
@@ -138,7 +138,7 @@
SET_DTV_GENERATION(tcb->tcb_dtv, _rtld_tls_dtv_generation);
for (obj = _rtld_objlist; obj != NULL; obj = obj->next) {
- if (obj->tlssize) {
+ if (obj->tlsinitsize && obj->tls_done) {
#ifdef __HAVE_TLS_VARIANT_I
q = p + obj->tlsoffset;
#else
diff -r d58e55631b71 -r ab915f014347 tests/lib/libc/tls/dso/h_tls_dlopen.c
--- a/tests/lib/libc/tls/dso/h_tls_dlopen.c Thu Nov 07 20:19:40 2013 +0000
+++ b/tests/lib/libc/tls/dso/h_tls_dlopen.c Thu Nov 07 20:32:36 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_tls_dlopen.c,v 1.4 2012/01/17 20:34:57 joerg Exp $ */
+/* $NetBSD: h_tls_dlopen.c,v 1.4.14.1 2013/11/07 20:32:36 snj Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: h_tls_dlopen.c,v 1.4 2012/01/17 20:34:57 joerg Exp $");
+__RCSID("$NetBSD: h_tls_dlopen.c,v 1.4.14.1 2013/11/07 20:32:36 snj Exp $");
#include <atf-c.h>
#include <unistd.h>
@@ -45,6 +45,7 @@
extern __thread int var1;
extern __thread int var2;
extern __thread int *var3;
+__thread int var5 = 1;
static __thread pid_t (*local_var)(void) = getpid;
void testf_dso_helper(int x, int y);
Home |
Main Index |
Thread Index |
Old Index