This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]