提交 a0a4f015 编写于 作者: K kvn

6667581: Don't generate initialization (by 0) code for arrays with size 0

Summary: generate_arraycopy() does not check the size of allocated array.
Reviewed-by: jrose, never
上级 b72fe8e1
......@@ -4170,6 +4170,7 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
&& !_gvn.eqv_uncast(src, dest)
&& ((alloc = tightly_coupled_allocation(dest, slow_region))
!= NULL)
&& _gvn.find_int_con(alloc->in(AllocateNode::ALength), 1) > 0
&& alloc->maybe_set_complete(&_gvn)) {
// "You break it, you buy it."
InitializeNode* init = alloc->initialization();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册