Uploaded image for project: 'C++ Standard Library'
  1. C++ Standard Library
  2. STDCXX-523

data race in std::locale::classic()

Add voteWatch issue
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.1.3, 4.1.4, 4.2.0
    • Fix Version/s: 4.3.0
    • Component/s: 22. Localization
    • Labels:
      None
    • Severity:
      Resource Leak

      Description

      Intel Thread Checker reports the following data race in std::locale::classic():

      $ tcheck_cl ./22.locale.statics.mt --no-global --nthreads=2
      Intel(R) Thread Checker 3.1 command line instrumentation driver (24400)
      Copyright (c) 2007 Intel Corporation. All rights reserved.
      Building project

      Running: /build/sebor/stdcxx-trunk-gcc-3.4.6_3-15D/tests/22.locale.statics.mt --no-global --nthreads=2

      1. INFO (S1) (10 lines):
      2. TEXT:
      3. COMPILER: gcc 3.4.6, _VERSION_ = "3.4.6 20060404 (Red Hat 3.4.6-3)"
      4. ENVIRONMENT: x86_64/LP64 running linux-elf (Red Hat Enterprise Linux AS release 4 (Nahant Update 4)) with glibc 2.3
      5. FILE: 22.locale.statics.mt.cpp
      6. COMPILED: Aug 16 2007, 19:32:08
      7. COMMENT: thread safety
        ############################################################
      1. CLAUSE: lib.locale.statics
      1. INFO (S1) (3 lines):
      2. TEXT: testing std::locale::classic() with 2 threads
      3. CLAUSE: lib.locale.statics
      1. NOTE (S2) (4 lines):
      2. TEXT: std::locale::global(const std::locale&) test disabled
      3. CLAUSE: lib.locale.statics
      4. LINE: 129
      1. -----------------------------------------------+
      2. DIAGNOSTIC ACTIVE TOTAL INACTIVE
      3. -----------------------------------------------+
      4. (S1) INFO 2 2 0%
      5. (S2) NOTE 1 2 50%
      6. -----------------------------------------------+

      Application finished

      _______________________________________________________________________________

      ID Short De Seve C Context Description 1st Acc 2nd Acce
        scriptio rity o [Best]   ess[Bes ss[Best]
        n Name u     t]  
            n        
            t        

      _______________________________________________________________________________

      1 Write -> Erro 3 "22.loc Memory read at "_mutex "22.loca
        Read dat r 6 ale.sta "22.locale.statics.mt.cpp":78 .h":580 le.stati
        a-race     tics.mt conflicts with a prior memory   cs.mt.cp
              .cpp":6 write at "_mutex.h":580 (flow   p":78
              9 dependence)    

      _______________________________________________________________________________

      2 Read -> Erro 1 [libstd Memory write at [libstd15D.so, "locale [libstd1
        Write da r   15D.so, 0xb646b] conflicts with a prior _classi 5D.so,
        ta-race     0xb6460 memory read at c.cpp": 0xb646b]
              ] "locale_classic.cpp":45 (anti 45  
                dependence)    

      _______________________________________________________________________________

      3 Read -> Erro 1 [libstd Memory write at [libstd15D.so, "locale [libstd1
        Write da r   15D.so, 0xb646b] conflicts with a prior _classi 5D.so,
        ta-race     0xb6460 memory read at c.cpp": 0xb646b]
              ] "locale_classic.cpp":55 (anti 55  
                dependence)    

      _______________________________________________________________________________

      4 Thread t Info 1 Whole Thread termination at "thread "thread.
        erminati rmat   Program "thread.cpp":84 - includes stack .cpp":8 cpp":84
        on ion   1 allocation of 10.004 MB and use 4  
                of 10.203 KB    

      _______________________________________________________________________________

      5 Thread t Info 1 Whole Thread termination at "thread "thread.
        erminati rmat   Program "thread.cpp":84 - includes stack .cpp":8 cpp":84
        on ion   2 allocation of 10.004 MB and use 4  
                of 10.188 KB    

      _______________________________________________________________________________

      6 Thread t Info 1 Whole Thread termination at "22.loc "22.loca
        erminati rmat   Program "22.locale.statics.mt.cpp":171 - ale.sta le.stati
        on ion   3 includes stack allocation of 10 tics.mt cs.mt.cp
                MB and use of 8.094 KB .cpp":1 p":171
                  71  

      _______________________________________________________________________________

        Attachments

        1. 22.locale.statics.mt.html
          4 kB
          Martin Sebor
        2. 22.locale.statics.mt.html
          4 kB
          Martin Sebor
        3. 22.locale.statics.mt.566892.html
          3 kB
          Martin Sebor

          Issue Links

            Activity

              People

              • Assignee:
                sebor Martin Sebor
                Reporter:
                sebor Martin Sebor

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 8h
                  8h
                  Remaining:
                  Remaining Estimate - 8h
                  8h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                    Issue deployment