Don't call vg_assert inside sync_signalhandler_from_kernel
[valgrind.git] / memcheck / tests / resvn_stack.c
blobaa1fc2af848e367c8990574adcbee0a77942c6ab
1 #include <stdio.h>
3 __attribute__((noinline)) void big(void)
5 /* The below ensures the stack grows a lot. However, we hope the stack
6 extension is not done yet, as no memory has been read/written. */
7 volatile char c[200000];
9 /* Access only the higher part of the stack, to avoid mapping SP */
10 /* The below 2 printfs should produce deterministic output, whatever
11 the random value of c[]. */
12 if (c[200000 - 1])
13 fprintf(stderr, "Accessing fresh %s\n", "stack");
14 else
15 fprintf(stderr, "Accessing %s stack\n", "fresh");
19 int main(void )
21 big();
22 return 0;