[Bug libstdc++/12855] Thread safety problems in ios_base::Init

rittle at latour dot rsch dot comm dot mot dot com gcc-bugzilla@gcc.gnu.org
Mon Nov 3 23:52:00 GMT 2003


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



More information about the Gcc-bugs mailing list