components/stdcxx/patches/045-ios.cpp.patch
author Tomas Klacko <tomas.klacko@oracle.com>
Tue, 25 Mar 2014 10:51:42 +0100
branchs11u1-sru
changeset 3011 9265805e77d5
parent 402 94ae4d75524c
permissions -rw-r--r--
17851169 ksh93 core dump in sh_assignok() function

--- stdcxx-4.2.1/src/ios.cpp	2008-04-24 20:25:19.000000000 -0400
+++ stdcxx-4.2.1/src/ios.cpp	2009-07-29 17:22:37.000000000 -0400
@@ -42,9 +42,18 @@
 
 _RWSTD_NAMESPACE (__rw) {
 
+#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT)
+#  pragma align 8(__rw_std_streams)
+#  pragma pack(8)
+#endif
+
 // array of pointers to the 8 standard iostream objects
 _RWSTD_EXPORT const void* __rw_std_streams [8];
 
+#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT)
+#  pragma pack(0)
+#endif
+
 }   // namespace __rw
 
 
@@ -65,6 +74,10 @@
 
 ios_base::~ios_base()
 {
+#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT)
+#  pragma pack(8)
+#  pragma align 8(U)
+#endif
     // verify that _C_usr_data is a POD (i.e., has no user-defined ctor)
     // necessary in order for the C_std_usr_data array defined above to
     // not be overwritten during dynamic initialization
@@ -72,6 +85,10 @@
         ios_base::_C_usr_data dummy;
     };
 
+#if defined(_RWSTD_STRICT_SPARCV8_MUTEX_ALIGNMENT)
+#  pragma pack(0)
+#endif
+
     // MT guard or reentrancy not necessary in a dtor
 
     if (_C_usr) {