mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6663908: NegativeArraySizeException is not thrown
Don't optimize zero length array allocations at compile time. Reviewed-by: kvn, never
This commit is contained in:
parent
3093e354db
commit
bfbfdfa428
1 changed files with 1 additions and 1 deletions
|
@ -408,7 +408,7 @@ void Parse::do_multianewarray() {
|
|||
jint dim_con = find_int_con(length[j], -1);
|
||||
expand_fanout *= dim_con;
|
||||
expand_count += expand_fanout; // count the level-J sub-arrays
|
||||
if (dim_con < 0
|
||||
if (dim_con <= 0
|
||||
|| dim_con > expand_limit
|
||||
|| expand_count > expand_limit) {
|
||||
expand_count = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue