This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

           Summary: Thread safety problems in ios_base::Init
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: peturr02 at ru dot is
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

ios_base::Init::Init()
  {
    if (_S_ios_base_init == 0)
      {

        _S_ios_base_init = 1;
      }
    ++_S_ios_base_init;
  }

 ios_base::Init::~Init()
  {
    if (--_S_ios_base_init == 1)
      {
        // Catch any exceptions thrown by basic_ostream::flush()
        try
          { 
            // Flush standard output streams as required by 27.4.2.1.6
            cout.flush();
            cerr.flush();
            clog.flush();
    
#ifdef _GLIBCXX_USE_WCHAR_T
            wcout.flush();
            wcerr.flush();
            wclog.flush();    
#endif
          }
        catch (...)
          { }
      }
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]