mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8203881: Print erroneous size in NegativeArraySizeException
Reviewed-by: dholmes, stuefe
This commit is contained in:
parent
6a48db9cf6
commit
ff2c3d4dbe
6 changed files with 315 additions and 7 deletions
|
@ -130,7 +130,7 @@ bool ArrayKlass::compute_is_subtype_of(Klass* k) {
|
|||
|
||||
objArrayOop ArrayKlass::allocate_arrayArray(int n, int length, TRAPS) {
|
||||
if (length < 0) {
|
||||
THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
|
||||
THROW_MSG_0(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", length));
|
||||
}
|
||||
if (length > arrayOopDesc::max_array_length(T_ARRAY)) {
|
||||
report_java_out_of_memory("Requested array size exceeds VM limit");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue