This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: gcc-3.4.0: mt_allocator crashes due to alignment problems onSPARC targets when sizeof(type) <= 2
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Brad Spencer <spencer at infointeractive dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Wed, 05 May 2004 00:22:49 +0200
- Subject: Re: gcc-3.4.0: mt_allocator crashes due to alignment problems onSPARC targets when sizeof(type) <= 2
- References: <20040504221210.GC21258@eng.infointeractive.com>
Brad Spencer wrote:
It appears that when sizeof(type) is less than or equal to 2, the
mt_allocator does not ensure proper alignment of the block_record
structures when building the freelists. This causes the allocator
code itself to crash during initialization.
Hi. This issue is well known and already (partially, at least) fixed in
mainline.
Could you possibly try it?
Anyway, on mainline too, we only ensure currently alignment-4 on 32-bit
machines
and alignement-8 on 64-bit machines, I have a patch in testing that
changes it to
8 and 16 respectively, exactly what malloc returns.
Please, be patient for a few days...
Also, I wasn't aware that the default allocator had become "new", at
least for Solaris targets. Was this intentional?
Yes. Again, on mainline (or a snapshot of 3.4.1) pool_allocator is also
available again.
Paolo.