test-segfault.c 342 Bytes
Newer Older
1
/* This is simply a process that segfaults */
2
#include <config.h>
3
#include <stdlib.h>
4
#ifdef HAVE_SIGNAL_H
5
#include <signal.h>
6
#endif
7

8
#include "disable-crash-handling.h"
9

10 11 12
int
main (int argc, char **argv)
{
13 14
  char *p;  

15
  _dbus_disable_crash_handling ();
16 17

#ifdef HAVE_RAISE
18
  raise (SIGSEGV);
19
#endif
20
  p = NULL;
21 22 23 24
  *p = 'a';
  
  return 0;
}