does g++ delay initializing static local variables?

Jonathan Wakely jwakely.gcc@gmail.com
Sat May 14 13:44:00 GMT 2011


On 13 May 2011 23:34, Brendan Miller wrote:
> On Wed, May 11, 2011 at 2:35 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>> On 11 May 2011 01:52, Brendan Miller wrote:
>>>
>>> In some older versions of G++ there seems to be a bug in the lazy
>>> initialization code that was causing an exception to be thrown in some
>>> circumstances.
>>
>> Can you reliably reproduce those circumstances or is it something
>> you've only seen in occasional stack traces?
>>
>
> It's a multi-threading problem, so it's inherently not deterministic.
> However, I asked and apparently we've been seeing that code throw an
> exception on a regular basis.

So you should be able to catch the exception to see if it is the
recursive_init type, right?

You could also try running against an alternative libstdc++.so.6,
either built with debugging symbols to help debug the stack traces, or
from a later gcc, to see if the problem goes away.



More information about the Gcc-help mailing list