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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 4.2.1, 4.2.x, 4.3.x
    • 4.2.x, 4.3.x
    • 21. Strings
    • None
    • Any compiler besides HP/UX's aCC.

    • Patch Available
    • 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

            Unassigned Unassigned
            steleman Stefan Teleman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: