提交 5c23285a 编写于 作者: R rasbold

6663908: NegativeArraySizeException is not thrown

Summary: Don't optimize zero length array allocations at compile time.
Reviewed-by: kvn, never
上级 ae4a69c4
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册