summaryrefslogtreecommitdiff
path: root/test/test-segfault.c
blob: 5c559ccb9a0e4ec027fd32526141d8d0b24aa103 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* This is simply a process that segfaults */
#include <config.h>
#include <stdlib.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif

#include "disable-crash-handling.h"

int
main (int argc, char **argv)
{
  char *p;  

  _dbus_disable_crash_handling ();

#ifdef HAVE_RAISE
  raise (SIGSEGV);
#endif
  p = NULL;
  *p = 'a';
  
  return 0;
}