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

[Oracle Solaris/SPARCV8] stricter mutex alignment requirements

    XMLWordPrintableJSON

    Details

    • Patch Info:
      Patch Available
    • Severity:
      Incorrect Behavior

      Description

      The issue has been reported in STDCXX-1040, then STDCXX-1066. The originator was apparently an improvement (as a response to CR 6296770: http://tinyurl.com/8ohjsgl) shipped with KU 137111-01 (http://tinyurl.com/ceet6ec) which requires stricter alignment than the machine word for userland mutexes.

      Quoting here the Fujitsu patch notes (in case it goes away):

      2) When an application using the mutex lock or rw lock in the way shown below is executed. (*1, *2) ...
      
            *2) ... example of programming that causes the ... problem.
      
              <In the case where the problem occurs>
                ----------------------------------------------------------------
                int       *ip;
                mutex_t   *mp;
                ip = (int *) malloc(sizeof (int) + sizeof (mutex_t));
                mp = (mutex_t *) (ip + 1);
                                   /* The address is used with a modification */
                ----------------------------------------------------------------
      
              <In the case where the problem does not occur -1>
                ----------------------------------------------------------------
                mutex_t   mp;                          /* Obtained statically */
                ----------------------------------------------------------------
      
              <In the case where the problem does not occur -2>
                ----------------------------------------------------------------
                mutex_t   *mp;
                mp = (mutex_t *) malloc(sizeof (mutex_t));
                             /* The address is used without any modifications */
                ----------------------------------------------------------------
      

        Attachments

        1. patch.diff
          3 kB
          Liviu Nicoara
        2. patch.2.diff
          8 kB
          Liviu Nicoara
        3. after-runall.log
          59 kB
          Travis Vitek
        4. before-runall.log
          59 kB
          Travis Vitek

          Issue Links

            Activity

              People

              • Assignee:
                nikkoara Liviu Nicoara
                Reporter:
                nikkoara Liviu Nicoara
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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