equal
deleted
inserted
replaced
|
1 /* Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.*/ |
|
2 /* This is simply a process that segfaults */ |
|
3 #include <stdlib.h> |
|
4 #ifndef TODO |
|
5 #include <signal.h> |
|
6 #endif |
|
7 #include <sys/time.h> |
|
8 #include <sys/resource.h> |
|
9 |
|
10 int |
|
11 main () |
|
12 { |
|
13 char *p; |
|
14 |
|
15 struct rlimit r = { 0, }; |
|
16 #ifndef TODO |
|
17 getrlimit (RLIMIT_CORE, &r); |
|
18 r.rlim_cur = 0; |
|
19 setrlimit (RLIMIT_CORE, &r); |
|
20 |
|
21 raise (SIGSEGV); |
|
22 #endif |
|
23 p = NULL; |
|
24 *p = 'a'; |
|
25 |
|
26 return 0; |
|
27 } |