mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6875393: 2/3 JNI itable index cache is broken
Add missing initialization of cache size. Reviewed-by: tbell
This commit is contained in:
parent
40de9c5fcc
commit
779247f1cb
1 changed files with 1 additions and 0 deletions
|
@ -1073,6 +1073,7 @@ void instanceKlass::set_cached_itable_index(size_t idnum, int index) {
|
|||
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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue