testsuite_allocator.h vs anonymous namespace

Paolo Carlini pcarlini@suse.de
Wed May 23 20:17:00 GMT 2007


Hi,

>> A bit of debugging revealed that in such cases the test begins and 
>> (let's consider for example ext/array_allocator/check_new.cc), the 
>> new_called boolean, in the anonymous namespace, has not been 
>> initialed to false. Any idea what may be going wrong?
>
> Maybe order-of-initialization issues?

I also suspected that and, to be sure, I tweaked a bit 
testsuite_allocator.h to avoid any possible issue of that kind. However, 
strangely, a similar problem persists for 
pool_allocator/allocate_chunk.cc, which only involves a static *local*. 
Weird. I wonder whether something is actually very subtly broken in the 
compiler in the area of statics inizialization... We should probably try 
to prepare a minimal testcase, but currently the only way I can 
reproduce is with the full, large, testsuite PCH (and generic locale 
model)...

Paolo.



More information about the Libstdc++ mailing list