gcc-3.4.0: mt_allocator crashes due to alignment problems on SPARC targets when sizeof(type) <= 2

Paolo Carlini pcarlini@suse.de
Tue May 4 22:31:00 GMT 2004


Brad Spencer wrote:

>This'll teach me to not check the latest CVS before posting.  It looks
>like Paolo's change in rev 1.22 may have addressed this by setting a
>minimum bin size (defaulted to 8).  I see the thread about that
>mentioned alignment problems on ia64.  Sorry for the duplicate issue.
>
>Can I just drop the latest version of mt_allocator.h into the
>gcc-3.4.0 source tree safely?
>
Yes, you can, to my best knowledge, but beware that you will not get for now
the perfect alignment anyway (see my previous message): honestly I don't 
know
the details of Sparc, hopefully what you get now is already sufficient 
to avoid
crashes (not the optimal performance, tough)

>  Perhaps I should just use "pool"
>for now instead?
>
This is also an option: however, be warned that on 64-bit machines you 
have to
set _S_align = 16.

Paolo.



More information about the Libstdc++ mailing list