mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 22:04:51 +02:00
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:
parent
6a4aa00cc1
commit
2a692f80bf
6 changed files with 26 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue