Home | History | Annotate | Download | only in tests

Lines Matching refs:array

111    int *array, *array3;
114 array = custom_alloc(sizeof(int) * 10);
115 array[8] = 8;
116 array[9] = 8;
117 array[10] = 10; // invalid write (ok w/o MALLOCLIKE -- in superblock)
119 VALGRIND_RESIZEINPLACE_BLOCK(array, sizeof(int) * 10, sizeof(int) * 5, RZ);
120 array[4] = 7;
121 array[5] = 9; // invalid write
123 // Make the entire array defined again such that it can be verified whether
125 VALGRIND_MAKE_MEM_DEFINED(array, sizeof(int) * 10);
127 VALGRIND_RESIZEINPLACE_BLOCK(array, sizeof(int) * 5, sizeof(int) * 7, RZ);
128 if (array[5]) array[4]++; // uninitialized read of array[5]
129 array[5] = 11;
130 array[6] = 7;
131 array[7] = 8; // invalid write
134 VALGRIND_RESIZEINPLACE_BLOCK(array+1, sizeof(int) * 7, sizeof(int) * 8, RZ);
136 custom_free(array); // ok
144 x = array[0]; // use after free (ok without MALLOCLIKE/MAKE_MEM_NOACCESS)