8011773: Some tests on Interned String crashed JVM with OOM

Instead of terminating the VM, throw OutOfMemoryError exceptions.

Reviewed-by: coleenp, dholmes
This commit is contained in:
Harold Seigel 2013-04-29 16:13:57 -04:00
parent 6a4aa00cc1
commit 2a692f80bf
6 changed files with 26 additions and 17 deletions

View file

@ -153,7 +153,7 @@ class java_lang_String : AllStatic {
static char* as_utf8_string(oop java_string, char* buf, int buflen);
static char* as_utf8_string(oop java_string, int start, int len);
static char* as_platform_dependent_str(Handle java_string, TRAPS);
static jchar* as_unicode_string(oop java_string, int& length);
static jchar* as_unicode_string(oop java_string, int& length, TRAPS);
// produce an ascii string with all other values quoted using \u####
static char* as_quoted_ascii(oop java_string);