author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:48:56 +0100 | |
branch | GCC_SURGE |
changeset 45 | 4b03adbd26ca |
parent 18 | 47c74d1534e1 |
parent 34 | 5fae379060a7 |
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 |
} |