Mercurial > hg > graal-compiler
diff src/share/vm/prims/jvmtiEnv.cpp @ 17946:997fd9660dd5
8027230: Overflow in java.lang.instrument.Instrumentation.getObjectSize() method
Reviewed-by: dholmes, sspitsyn
author | allwin |
---|---|
date | Thu, 22 May 2014 09:12:29 +0200 |
parents | b8860472c377 |
children | 52b4284cb496 887a7cedb892 |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiEnv.cpp Wed May 21 11:25:25 2014 +0200 +++ b/src/share/vm/prims/jvmtiEnv.cpp Thu May 22 09:12:29 2014 +0200 @@ -307,9 +307,9 @@ !java_lang_Class::is_primitive(mirror)) { Klass* k = java_lang_Class::as_Klass(mirror); assert(k != NULL, "class for non-primitive mirror must exist"); - *size_ptr = k->size() * wordSize; + *size_ptr = (jlong)k->size() * wordSize; } else { - *size_ptr = mirror->size() * wordSize; + *size_ptr = (jlong)mirror->size() * wordSize; } return JVMTI_ERROR_NONE; } /* end GetObjectSize */