projects
/
platform
/
upstream
/
dbus.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2003-04-10 Havoc Pennington <hp@pobox.com>
[platform/upstream/dbus.git]
/
test
/
test-segfault.c
1
/* This is simply a process that segfaults */
2
#include <signal.h>
3
4
#include <sys/resource.h>
5
6
int
7
main (int argc, char **argv)
8
{
9
char *p;
10
11
struct rlimit r = { 0, };
12
13
getrlimit (RLIMIT_CORE, &r);
14
r.rlim_cur = 0;
15
setrlimit (RLIMIT_CORE, &r);
16
17
raise (SIGSEGV);
18
19
p = 0;
20
*p = 'a';
21
22
return 0;
23
}