This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.23-354-gdea39b1
- From: fw at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 24 May 2016 06:09:15 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.23-354-gdea39b1
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 dea39b13e2958a7f0e75b5594a06d97d61cc439f (commit)
from db1fa6b8d32a0c7155dcaed2f5f9388511613595 (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=dea39b13e2958a7f0e75b5594a06d97d61cc439f
commit dea39b13e2958a7f0e75b5594a06d97d61cc439f
Author: Florian Weimer <fweimer@redhat.com>
Date: Tue May 24 08:05:15 2016 +0200
malloc: Correct malloc alignment on 32-bit architectures [BZ #6527]
After the heap rewriting added in commit
4cf6c72fd2a482e7499c29162349810029632c3f (malloc: Rewrite dumped heap
for compatibility in __malloc_set_state), we can change malloc alignment
for new allocations because the alignment of old allocations no longer
matters.
We need to increase the malloc state version number, so that binaries
containing dumped heaps of the new layout will not try to run on
previous versions of glibc, resulting in obscure crashes.
This commit addresses a failure of tst-malloc-thread-fail on the
affected architectures (32-bit ppc and mips) because the test checks
pointer alignment.
diff --git a/ChangeLog b/ChangeLog
index 14822af..2b51267 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-05-24 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #6527]
+ * malloc/malloc.c (MALLOC_ALIGNMENT): Use correct alignment
+ unconditionally.
+ * malloc/hooks.c (MALLOC_STATE_VERSION): Increase state version.
+
2016-05-23 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
* stdlib/tst-strtod6.c (do_test): Use new type generic
diff --git a/malloc/hooks.c b/malloc/hooks.c
index 45241f2..caa1e70 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -465,7 +465,7 @@ memalign_check (size_t alignment, size_t bytes, const void *caller)
then the hooks are reset to 0. */
#define MALLOC_STATE_MAGIC 0x444c4541l
-#define MALLOC_STATE_VERSION (0 * 0x100l + 4l) /* major*0x100 + minor */
+#define MALLOC_STATE_VERSION (0 * 0x100l + 5l) /* major*0x100 + minor */
struct malloc_save_state
{
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 44524ff..ead9a21 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -352,20 +352,8 @@ __malloc_assert (const char *assertion, const char *file, unsigned int line,
#ifndef MALLOC_ALIGNMENT
-# if !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_16)
-/* This is the correct definition when there is no past ABI to constrain it.
-
- Among configurations with a past ABI constraint, it differs from
- 2*SIZE_SZ only on powerpc32. For the time being, changing this is
- causing more compatibility problems due to malloc_get_state and
- malloc_set_state than will returning blocks not adequately aligned for
- long double objects under -mlong-double-128. */
-
-# define MALLOC_ALIGNMENT (2 *SIZE_SZ < __alignof__ (long double) \
- ? __alignof__ (long double) : 2 *SIZE_SZ)
-# else
-# define MALLOC_ALIGNMENT (2 *SIZE_SZ)
-# endif
+# define MALLOC_ALIGNMENT (2 * SIZE_SZ < __alignof__ (long double) \
+ ? __alignof__ (long double) : 2 * SIZE_SZ)
#endif
/* The corresponding bit mask value */
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
malloc/hooks.c | 2 +-
malloc/malloc.c | 16 ++--------------
3 files changed, 10 insertions(+), 15 deletions(-)
hooks/post-receive
--
GNU C Library master sources