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.18-287-g75b4202


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  75b4202ab03337edb37536e3d9470a48a04c9341 (commit)
      from  33b853c3b19a2a75f720f9fca312a651ab17728a (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=75b4202ab03337edb37536e3d9470a48a04c9341

commit 75b4202ab03337edb37536e3d9470a48a04c9341
Author: David S. Miller <davem@davemloft.net>
Date:   Thu Oct 10 22:32:36 2013 -0700

    Fix readdir regressions on sparc 32-bit.
    
    	* sysdeps/posix/dirstream.h (struct __dirstream): Fix alignment of
    	directory block.

diff --git a/ChangeLog b/ChangeLog
index fdc2f0b..5d99bd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-10  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/posix/dirstream.h (struct __dirstream): Fix alignment of
+	directory block.
+
 2013-10-10  Joseph Myers  <joseph@codesourcery.com>
 
 	* soft-fp/extendxftf2.c: Use copyright year range.  Use URL
diff --git a/sysdeps/posix/dirstream.h b/sysdeps/posix/dirstream.h
index 8e8570d..be20895 100644
--- a/sysdeps/posix/dirstream.h
+++ b/sysdeps/posix/dirstream.h
@@ -41,8 +41,13 @@ struct __dirstream
 
     int errcode;		/* Delayed error code.  */
 
-    /* Directory block.  */
-    char data[0] __attribute__ ((aligned (__alignof__ (void*))));
+    /* Directory block.  We must make sure that this block starts
+       at an address that is aligned adequately enough to store
+       dirent entries.  Using the alignment of "void *" is not
+       sufficient because dirents on 32-bit platforms can require
+       64-bit alignment.  We use "long double" here to be consistent
+       with what malloc uses.  */
+    char data[0] __attribute__ ((aligned (__alignof__ (long double))));
   };
 
 #define _DIR_dirfd(dirp)	((dirp)->fd)

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

Summary of changes:
 ChangeLog                 |    5 +++++
 sysdeps/posix/dirstream.h |    9 +++++++--
 2 files changed, 12 insertions(+), 2 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]