This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.17-866-gce61a2a


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  ce61a2ad2e078a19454411832b167444b6c9ae66 (commit)
      from  ef65da39e62ecd49e2b65b0cb6e4c8f75a1ee096 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ce61a2ad2e078a19454411832b167444b6c9ae66

commit ce61a2ad2e078a19454411832b167444b6c9ae66
Author: Nathan Froyd <froydnj@codesourcery.com>
Date:   Fri Jun 28 21:42:19 2013 +0000

    Mark packed structure element used with atomic operation aligned.

diff --git a/ChangeLog b/ChangeLog
index ec42b6c..4ca3864 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-06-28  Nathan Froyd  <froydnj@codesourcery.com>
+	    Joseph Myers  <joseph@codesourcery.com>
+
+	* elf/dl-profile.c (struct here_cg_arc_record): Declare 'count'
+	as being properly aligned.
+
 2013-06-28  Maciej W. Rozycki  <macro@codesourcery.com>
 
 	* dlfcn/modstatic5.c: New file.
diff --git a/elf/dl-profile.c b/elf/dl-profile.c
index 9034be2..8fa6efc 100644
--- a/elf/dl-profile.c
+++ b/elf/dl-profile.c
@@ -131,7 +131,18 @@ struct here_cg_arc_record
   {
     uintptr_t from_pc;
     uintptr_t self_pc;
-    uint32_t count;
+    /* The count field is atomically incremented in _dl_mcount, which
+       requires it to be properly aligned for its type, and for this
+       alignment to be visible to the compiler.  The amount of data
+       before an array of this structure is calculated as
+       expected_size in _dl_start_profile.  Everything in that
+       calculation is a multiple of 4 bytes (in the case of
+       kcountsize, because it is derived from a subtraction of
+       page-aligned values, and the corresponding calculation in
+       __monstartup also ensures it is at least a multiple of the size
+       of u_long), so all copies of this field do in fact have the
+       appropriate alignment.  */
+    uint32_t count __attribute__ ((aligned (__alignof__ (uint32_t))));
   } __attribute__ ((packed));
 
 static struct here_cg_arc_record *data;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    6 ++++++
 elf/dl-profile.c |   13 ++++++++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]