This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/12855] Thread safety problems in ios_base::Init
- From: "rittle at latour dot rsch dot comm dot mot dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Nov 2003 23:52:57 -0000
- Subject: [Bug libstdc++/12855] Thread safety problems in ios_base::Init
- References: <20031031094301.12855.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12855
------- Additional Comments From rittle at latour dot rsch dot comm dot mot dot com 2003-11-03 23:52 -------
Subject: Re: New: Thread safety problems in ios_base::Init
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12855
>
> Summary: Thread safety problems in ios_base::Init
Is this a hypothetical PR or actually seen in practice?
Given the usage of std::ios_base::Init by the library, I'd need more
information on how this could possibly fail in practice. The
constructor (for a global static) will run once before threading could
possibly have started. Likewise, there is only one thread in the
system which may run destructors (for any global statics).
Please describe the actual system setup where you see these
assumptions violated. std::ios_base::Init should never be used
outside global objects.
Regards,
Loren