author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 11 Jun 2010 15:26:22 +0300 | |
changeset 34 | 5fae379060a7 |
parent 31 | ce057bb09d0b |
child 45 | 4b03adbd26ca |
permissions | -rw-r--r-- |
34
5fae379060a7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
1 |
/* Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.*/ |
31 | 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 |
} |