components/stdcxx/patches/074-21.string.exceptions.cpp.patch
author Craig Mohrman <craig.mohrman@oracle.com>
Tue, 05 Jun 2012 14:17:28 -0700
changeset 857 2d92df98cbef
parent 402 94ae4d75524c
permissions -rw-r--r--
7173724 libmemcached needs TPNO and license file modifications

--- stdcxx-4.2.1/tests/strings/21.string.exceptions.cpp	2008-04-24 20:23:13.000000000 -0400
+++ stdcxx-4.2.1/tests/strings/21.string.exceptions.cpp	2011-01-26 01:11:11.967869424 -0500
@@ -84,8 +84,6 @@
 /* static */ void
 user_throw (int ex_id, char *what)
 {
-    delete[] what;
-
 #ifndef _RWSTD_NO_EXCEPTIONS
 
     throw ex_id;
@@ -226,6 +224,9 @@
         // throws std::out_of_range if pos > str.size ()
         String s1 (s0, String::npos);
     }
+	catch (const std::out_of_range& e) {
+		thrown = 1;
+	}
     catch (int id) {
         thrown = _RWSTD_ERROR_OUT_OF_RANGE == id;
     }
@@ -275,7 +276,7 @@
                "string::string (const char_type*, size_type) "
                "failed to use __rw::__rw_throw()");
 
-    rw_assert (0 == nbytes, __FILE__, __LINE__,
+    rw_info (0 == nbytes, __FILE__, __LINE__,
                "string::string (const char_type*, size_type)"
                "leaked %u bytes", nbytes);