1 #include <inttypes.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 int main()
5 {
6    __attribute__((unused)) char *p = malloc (1);
7    char *b1 = malloc (128);
8    char *b2 = malloc (128);
9    fprintf (stderr, "b1 %#" PRIxPTR " b2 %#" PRIxPTR "\n",
10                     (uintptr_t)b1, (uintptr_t)b2);
11 
12    // Try to land in b2 from b1, causing no error
13    // with the default redzone-size, but having
14    // an error with a bigger redzone-size.
15    // We need to choose a value which lands in b2
16    // on 32 bits and 64 bits.
17    b1[127 + 70] = 'a';
18    return 0;
19 }
20