This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] malloc: Rewrite dumped heap for compatibility in __malloc_set_state
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 5 May 2016 22:19:07 +0200
- Subject: Re: [PATCH] malloc: Rewrite dumped heap for compatibility in __malloc_set_state
- Authentication-results: sourceware.org; auth=none
- References: <572BA967 dot 5040200 at redhat dot com>
On 05/05/2016 10:13 PM, Florian Weimer wrote:
-#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) \
+#define MALLOC_ALIGNMENT (2 *SIZE_SZ < __alignof__ (long double) \
? __alignof__ (long double) : 2 *SIZE_SZ)
-# else
-# define MALLOC_ALIGNMENT (2 *SIZE_SZ)
-# endif
-#endif
Ugh, I used this for testing only. It will go into follow-up patch.
Florian