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

__rw_locale::_C_manage() uses mutex based __rw_atomic_preincrement() even if platform supports the native atomic operations

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1.2, 4.1.3, 4.1.4, 4.2.0
    • 4.2.1
    • 22. Localization
    • None
    • All

    • Patch Available
    • Inefficiency

    Description

      In __rw_locale::_C_manage() (src/locale_body.cpp, line 808), the static variable ginit declared as volatile, but __rw_atomic_preincrement() functions, which are implemented using atomic operations, accepting the non-volatile reference in parameter list. As a result the template version __rw_atomic_preincrement<volatile long>() (which is implemented using mutex object) is used.

      Attachments

        Issue Links

          Activity

            People

              farid Farid Zaripov
              farid Farid Zaripov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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