This is the mail archive of the
mailing list for the glibc project.
Re: PowerPC malloc alignment
- From: Jakub Jelinek <jakub at redhat dot com>
- To: libc-alpha at sourceware dot org, Steven Munroe <sjmunroe at us dot ibm dot com>
- Date: Wed, 31 Oct 2007 22:23:16 +0100
- Subject: Re: PowerPC malloc alignment
- References: <20071031205240.GA30110@caradoc.them.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 31, 2007 at 04:52:40PM -0400, Daniel Jacobowitz wrote:
> The malloc alignment on PowerPC (32-bit) was bumped up to 16 bytes
> just before glibc 2.4 and then immediately reverted. I eventually
> found the discussion of the reversion here:
> Jakub, were there more lurking problems than just the one you fixed in
> the patch attached to that bug?
> The current status breaks, among other things, GDB when built with
> "-maltivec -mabi=altivec -mlong-double-128". A 16-byte union
> including a long double is allocated in the heap and copied using
> lvx / stvx, which require a 16-byte aligned address.
The main problem is emacs (aka the only user of
malloc_set_state/malloc_get_state). Changing the alignment is really an ABI
change for these interfaces, unless it does some very ugly hacks in it.