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

@ -735,7 +735,7 @@ oop StringTable::intern(oop string, TRAPS)
ResourceMark rm(THREAD);
int length;
Handle h_string (THREAD, string);
jchar* chars = java_lang_String::as_unicode_string(string, length);
jchar* chars = java_lang_String::as_unicode_string(string, length, CHECK_NULL);
oop result = intern(h_string, chars, length, CHECK_NULL);
return result;
}