changeset 5220:16f41a7c5c28

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
author kvn
date Tue, 05 Aug 2014 14:44:18 -0700
parents f0d3edacea3a
children bad107a5d096
files src/share/vm/oops/typeArrayOop.hpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/oops/typeArrayOop.hpp	Thu Jul 31 12:10:10 2014 +0200
+++ 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);