regex memory corruption regression test
[libc-test] / src / regression / sigreturn.c
1 // commit: dc3776d445957cd3ea4a682db518701b93d34292 2011-02-13
2 // sigreturn crash
3 #include <signal.h>
4
5 static volatile sig_atomic_t x;
6
7 void handler(int s)
8 {
9         x = 1;
10 }
11
12 int main(void)
13 {
14         signal(SIGINT, handler);
15         if (raise(SIGINT))
16                 return 2;
17         if (x != 1)
18                 return 1;
19         return 0;
20 }