1.1 --- a/src/share/vm/oops/oop.cpp Fri Apr 26 08:40:24 2013 -0700 1.2 +++ b/src/share/vm/oops/oop.cpp Mon Apr 29 16:13:57 2013 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -103,11 +103,17 @@ 1.11 1.12 // When String table needs to rehash 1.13 unsigned int oopDesc::new_hash(jint seed) { 1.14 + EXCEPTION_MARK; 1.15 ResourceMark rm; 1.16 int length; 1.17 - jchar* chars = java_lang_String::as_unicode_string(this, length); 1.18 - // Use alternate hashing algorithm on the string 1.19 - return AltHashing::murmur3_32(seed, chars, length); 1.20 + jchar* chars = java_lang_String::as_unicode_string(this, length, THREAD); 1.21 + if (chars != NULL) { 1.22 + // Use alternate hashing algorithm on the string 1.23 + return AltHashing::murmur3_32(seed, chars, length); 1.24 + } else { 1.25 + vm_exit_out_of_memory(length, "unable to create Unicode strings for String table rehash"); 1.26 + return 0; 1.27 + } 1.28 } 1.29 1.30 VerifyOopClosure VerifyOopClosure::verify_oop;