7088065 CCVS test fail: no exception thrown for out-of-range string access s11-sru
authorStefan Teleman <stefan.teleman@oracle.com>
Wed, 26 Oct 2011 13:57:36 -0700
branchs11-sru
changeset 2228 5d1080eeaaee
parent 2227 972345a3c215
child 2229 c7d4ae552733
7088065 CCVS test fail: no exception thrown for out-of-range string access 7088072 -library=stdcxx4 caused runtime seg-fault 7098498 std::moneypunct typedef invalid on recent C++ compiler
components/stdcxx/patches/090-7088072-string.cc.patch
components/stdcxx/patches/091-7098498-moneypunct.h.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/090-7088072-string.cc.patch	Wed Oct 26 13:57:36 2011 -0700
@@ -0,0 +1,16 @@
+# Patch for CR 7088072 and 7088065
+--- stdcxx-4.2.1/include/string.cc	2011-07-10 13:09:53.630466602 -0700
++++ stdcxx-4.2.1/include/string.cc	2011-09-10 13:20:30.199451960 -0700
[email protected]@ -415,6 +415,12 @@
+                                    "size_type, size_type, value_type)"), 
+                       __size0 - __xlen, max_size () - __count));
+ 
++    _RWSTD_REQUIRES (__count < (max_size () - __pos),
++                     (_RWSTD_ERROR_LENGTH_ERROR,
++                      _RWSTD_FUNC ("basic_string::replace (size_type, "
++                                   "size_type, size_type, value_type)"), 
++                      __count, (max_size () - __pos)));
++
+     // compute the resulting string size
+     const size_type __size1 = __size0 - __xlen + __count;
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/091-7098498-moneypunct.h.patch	Wed Oct 26 13:57:36 2011 -0700
@@ -0,0 +1,12 @@
+# Patch for CR 7098498
+--- stdcxx-4.2.1/include/loc/_moneypunct.h	2011-07-10 11:57:53.407297720 -0700
++++ stdcxx-4.2.1/include/loc/_moneypunct.h	2011-10-06 09:50:48.591327947 -0700
[email protected]@ -67,7 +67,7 @@
+     typedef
+     basic_string<char_type, char_traits<char_type>, allocator<char_type> >
+     string_type;
+-    typedef moneypunct<_CharT, bool> _Type;
++    typedef moneypunct<_CharT, _Intl> _Type;
+ 
+     _EXPLICIT moneypunct (_RWSTD_SIZE_T __refs = 0)
+         : _RW::__rw_facet (__refs),