6875393: 2/3 JNI itable index cache is broken
authordcubed
Fri, 28 Aug 2009 12:25:46 -0600
changeset 3810 467c462a4525
parent 3580 55775b48f5e5
child 3811 e8139278d5d7
child 4490 0de5bbb57c99
6875393: 2/3 JNI itable index cache is broken Summary: Add missing initialization of cache size. Reviewed-by: tbell
hotspot/src/share/vm/oops/instanceKlass.cpp
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp	Tue Jul 28 13:35:00 2009 -0600
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp	Fri Aug 28 12:25:46 2009 -0600
@@ -1073,6 +1073,7 @@
     if (indices == NULL || (length = (size_t)indices[0]) <= idnum) {
       size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count());
       int* new_indices = NEW_C_HEAP_ARRAY(int, size+1);
+      new_indices[0] =(int)size;  // array size held in the first element
       // Copy the existing entries, if any
       size_t i;
       for (i = 0; i < length; i++) {