mt_allocator (rev 1.28) has static initilization problems?
Paolo Carlini
pcarlini@suse.de
Tue May 18 15:02:00 GMT 2004
Brad Spencer wrote:
>I've been trying to the (trunk) mt_allocator within the gcc-3.4.0
>sources (in another email thread) for alignment reasons on SPARC, and
>so far, I haven't had problems there. However, on i686-pc-linux-gnu,
>I've encountered problems with static initialization of the
>mt_allocator's _S_options structure.
>
Hi Brad and sorry for late replying.
For now, I want to simply add that probably I'm also seeing something
similar, on a 4-way x86_64 system. It's very difficult to reproduce, but
this
is the symptom:
0x00000000004027e6 in __gnu_cxx::__mt_alloc<int>::deallocate (this=0x64,
__p=0x401ffa10, __n=245)
at mt_allocator.h:448
448 __tmp = __tmp->_M_next;
As you can see, __n = 245, therefore, the code looping on __tmp =
__tmp->_M_next
should not be executed at all! The only plausible explanation is that
_S_options._M_max_bytes is stuck at zero (as you reported) sigh!
I'm now studying the details of your message. Do you have any news, anyway?
Thanks,
Paolo
More information about the Libstdc++
mailing list