This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/16796] [aarch64] pthread_self not aligned to 16 bytes when heap grows up
- From: "pinskia at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 02 Apr 2014 04:29:44 +0000
- Subject: [Bug nptl/16796] [aarch64] pthread_self not aligned to 16 bytes when heap grows up
- Auto-submitted: auto-generated
- References: <bug-16796-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=16796
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu.org
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Is this on aarch64?
If so I am have a fix:
diff --git a/sysdeps/aarch64/nptl/tls.h b/sysdeps/aarch64/nptl/tls.h
index 36af3a8..05135db 100644
--- a/sysdeps/aarch64/nptl/tls.h
+++ b/sysdeps/aarch64/nptl/tls.h
@@ -62,7 +62,7 @@ typedef struct
# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
/* Alignment requirements for the initial TCB. */
-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
/* This is the size of the TCB. */
# define TLS_TCB_SIZE sizeof (tcbhead_t)
@@ -71,7 +71,7 @@ typedef struct
# define TLS_PRE_TCB_SIZE sizeof (struct pthread)
/* Alignment requirements for the TCB. */
-# define TLS_TCB_ALIGN __alignof__ (tcbhead_t)
+# define TLS_TCB_ALIGN __alignof__ (struct pthread)
/* Install the dtv pointer. The pointer passed is to the element with
index -1 which contain the length. */
--- CUT ----
The problem is we are using the incorrect alignment here when we create the TLS
section in memory. As I said on the linaro list, I found this while working on
ILP32 and sotruss was failing. I will submit this patch once I do a build and
test using the upstream glibc.
--
You are receiving this mail because:
You are on the CC list for the bug.