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

HP/UX's aCC alignment problems misalign everyone else

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.2.1, 4.2.x, 4.3.x
    • Fix Version/s: 4.2.x, 4.3.x
    • Component/s: 21. Strings
    • Labels:
      None
    • Environment:

      Any compiler besides HP/UX's aCC.

    • Patch Info:
      Patch Available
    • Severity:
      Incorrect Behavior

      Description

      The following code in include/rw/_strref.h at line 245:

      _strref.h
          union {
              size_type _C_size;    // Number of actual data values stored
              _CharT    _C_dummy;   // force the alignment of the first char
          } _C_size;                // named to work around an HP aCC 3.30 bug
      
      

      causes misaligned reads/writes with SunPro 12.1, 12.2, 12.3 on Solaris (SPARC and Intel) and Linux (Intel), GCC 4.5.2 and 4.7.1 (Linux Intel) and Intel 2003 (Linux Intel).

      The following patch fixes the problem:

      _strref.h
           union {
               size_type _C_size;    // Number of actual data values stored
      +#if defined(__HP_aCC)
               _CharT    _C_dummy;   // force the alignment of the first char
      -    } _C_size;                // named to work around an HP aCC 3.30 bug
      +#endif                        // named to work around an HP aCC 3.30 bug
      +    } _C_size;
       };
      
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              steleman Stefan Teleman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: