projects
/
platform
/
upstream
/
dbus.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Ignore exit code zero from activated services
[platform/upstream/dbus.git]
/
test
/
test-segfault.c
1
/* This is simply a process that segfaults */
2
#include <config.h>
3
#include <stdlib.h>
4
#include <signal.h>
5
6
#ifdef HAVE_SETRLIMIT
7
#include <sys/resource.h>
8
#endif
9
10
int
11
main (int argc, char **argv)
12
{
13
char *p;
14
15
#if HAVE_SETRLIMIT
16
struct rlimit r = { 0, };
17
18
getrlimit (RLIMIT_CORE, &r);
19
r.rlim_cur = 0;
20
setrlimit (RLIMIT_CORE, &r);
21
22
raise (SIGSEGV);
23
#endif
24
p = NULL;
25
*p = 'a';
26
27
return 0;
28
}