7102044: G1: VM crashes with assert(old_end != new_end) failed: don't call this otherwise

ArrayOopDesc::max_array_length() should return a value that does not overflow a size_t if it is converted to bytes.

Reviewed-by: kvn, dholmes
This commit is contained in:
Bengt Rutisson 2011-10-31 08:01:20 +01:00
parent 3da2f5af5d
commit c444c3eee7
6 changed files with 79 additions and 21 deletions

View file

@ -5042,7 +5042,8 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *args_) {
void execute_internal_vm_tests() {
if (ExecuteInternalVMTests) {
assert(QuickSort::test_quick_sort(), "test_quick_sort failed");
tty->print_cr("All tests passed");
assert(arrayOopDesc::test_max_array_length(), "test_max_array_length failed");
tty->print_cr("All internal VM tests passed");
}
}