# HG changeset patch # User kvn # Date 1407275058 25200 # Node ID a27f16d45457a68a723acca621cb11bc173a0eb6 # Parent 342e3e35fdc12a05d4ad6140ebf134842c08efd0 8049542: C2: assert(size_in_words <= (julong)max_jint) failed: no overflow Summary: Added juint cast to avoid gcc problem we have on one of our platforms. Reviewed-by: dholmes, roland diff -r 342e3e35fdc1 -r a27f16d45457 src/share/vm/oops/typeArrayOop.hpp --- a/src/share/vm/oops/typeArrayOop.hpp Tue Aug 05 23:10:45 2014 -0400 +++ b/src/share/vm/oops/typeArrayOop.hpp Tue Aug 05 14:44:18 2014 -0700 @@ -162,7 +162,7 @@ DEBUG_ONLY(BasicType etype = Klass::layout_helper_element_type(lh)); assert(length <= arrayOopDesc::max_array_length(etype), "no overflow"); - julong size_in_bytes = length; + julong size_in_bytes = (juint)length; size_in_bytes <<= element_shift; size_in_bytes += instance_header_size; julong size_in_words = ((size_in_bytes + (HeapWordSize-1)) >> LogHeapWordSize);