RFR(S): 7178846: IterateThroughHeap: heap_iteration_callback passes a negative size for big array (original) (raw)

David Holmes david.holmes at oracle.com
Mon Jun 25 01:31:58 PDT 2012


Looks okay to me.

David

On 25/06/2012 6:05 PM, Staffan Larsen wrote:

Please review the following fix.

Bug: http://bugs.sun.com/bugdatabase/viewbug.do?bugid=7178846 Webrev: http://cr.openjdk.java.net/~sla/7178846/webrev.01/ Class CallbackWrapper in jvmtiTagMap.cpp has a missing cast which leads to an integer overflow. The code in question is objsize = o->size() * wordSize; objsize is a jlong o->size() is an int wordSize is an int Changing to: objsize = (jlong)o->size() * wordSize; fixes the overflow. Thanks, /Staffan



More information about the serviceability-dev mailing list