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

numpunct facet cache initialization is not thread -safe

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 4.2.1, 4.2.x, 4.3.x, 5.0.0
    • 4.2.x, 4.3.x, 5.0.0
    • $ uname -a; CC -V
      Linux behemoth 2.6.37.6 #3 SMP Sat Apr 9 22:49:32 CDT 2011 x86_64 AMD Opteron(tm) Processor 6134 AuthenticAMD GNU/Linux
      CC: Sun C++ 5.12 Linux_i386 2011/11/16

    • Patch Available
    • Incorrect Behavior

    Description

      The bug affects the initialization of the cached data in numpunct facet. The failing test is 22.locale.numpunct.cpp in certain builds: Linux with SUNPro 5.12, optimized, most likely to fail. It has been reported (see linked incidents) to fail on SPARC as well. It manifests in variate ways: sometimes as heap corruption, sometimes as access violations, etc. Test cases and library reduction programs to follow.

      Attachments

        1. punct-mt.cpp
          1 kB
          Liviu Nicoara
        2. patch-timings.tgz
          3 kB
          Liviu Nicoara
        3. patch-5.0.x.diff
          4 kB
          Liviu Nicoara
        4. patch-4.2.x.diff
          3 kB
          Liviu Nicoara
        5. library-reduction.cpp
          3 kB
          Liviu Nicoara

        Issue Links

          Activity

            People

              nikkoara Liviu Nicoara
              nikkoara Liviu Nicoara
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

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