7178846: IterateThroughHeap: heap_iteration_callback passes a negative size
authorsla
Mon, 25 Jun 2012 14:34:35 +0200
changeset 13096 8a01a0702816
parent 13095 e963ab7b3a6f
child 13098 c9b2dc03b271
7178846: IterateThroughHeap: heap_iteration_callback passes a negative size Summary: Missing cast caused integer overflow Reviewed-by: rbackman, dholmes
hotspot/src/share/vm/prims/jvmtiTagMap.cpp
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Fri Jun 22 15:39:16 2012 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp	Mon Jun 25 14:34:35 2012 +0200
@@ -585,7 +585,7 @@
     _o = klassOop_if_java_lang_Class(o);
 
     // object size
-    _obj_size = _o->size() * wordSize;
+    _obj_size = (jlong)_o->size() * wordSize;
 
     // record the context
     _tag_map = tag_map;