Request for review: 8011773: Some tests on Interned String crashed JVM with OOM
Per Lidén
per.liden at oracle.com
Thu Apr 25 06:57:38 PDT 2013
Hi,
Some comments (not a reviewer):
* lookup() is static, so StringTable::the_table()->lookup() should be
StringTable::lookup(). Not sure why the_table() is public, seems odd.
* Wouldn't it be nicer if lookup(jchar* name, int len) was lookup(oop
string) and let the lookup function worry about the reset?
* Can't we just avoid allocating memory in as_unicode_string() and
instead just do something like:
return length == 0 ? NULL : value->char_at_addr(offset);
Of course, that would require some adjustments to the inner
String::intern(), but nothing major as far as I can tell.
cheers,
/Per
On 2013-04-24 17:26, harold seigel wrote:
> Hi,
>
> Please review this fix for bug 8011773.
>
> Summary: Method as_unicode_string() now detects the memory allocation
> failure and throws an OutOfMemoryError exception. This lets its callers
> decide whether to abort the VM or allow the exception to be caught and
> execution continue.
>
> Open webrev at: http://cr.openjdk.java.net/~hseigel/bug_8011773/
> <http://cr.openjdk.java.net/%7Ehseigel/bug_8011773/>
> Bug Link at: http://bugs.sun.com/view_bug.do?bug_id=8011773
>
> Regression testing was done using JCK lang and vm tests, jtReg tests,
> JPRT, and ute vm.quick.testlist tests. Also, as_unicode_string() was
> temporarily changed to throw OutOfMemoryError exceptions in order to
> verify that the expected behavior occurred.
>
> Thanks, Harold
More information about the hotspot-runtime-dev
mailing list