1 // RUN: %clang_safestack %s -o %t
4 // RUN: %clang_nosafestack -fno-stack-protector %s -o %t
7 // Test that buffer overflows on the unsafe stack do not affect variables on the
10 // REQUIRES: stable-runtime
12 extern void *memset(void *, int, __typeof__(sizeof(0)));
14 __attribute__((noinline
))
15 void fct(volatile int *buffer
)
17 memset(buffer
- 1, 0, 7 * sizeof(int));
20 int main(int argc
, char **argv
)
30 return value1
!= 42 || value2
!= 42;