ppc64: Arguments to iselInt128Expr_to_32x4 should be initialized.
[valgrind.git] / memcheck / tests / realloc2.c
blob7b1fbf1e010259376507f261503fefb33745be14
1 /* This test demonstrated an obscure bug in malloclists handling caused by
2 multiple blocks hashing to the same list and one being overwritten at
3 realloc time due to bad ordering of the things happening. Now runs
4 without error. */
6 #include <stdlib.h>
7 #include <stdio.h>
9 int main ( void )
11 char* p;
12 int i;
13 for (i = 0; i < 10000; i++) {
14 p = malloc(10 + 10 * (i % 100));
15 p = realloc(p, 500);
16 p = realloc(p, 600);
17 free(p);
19 return 0;