summaryrefslogtreecommitdiff
path: root/test/test-segfault.c
blob: ef905c58d198d925b49ae3ebd578ae577408c545 (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
25
/* 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)
{
  _dbus_disable_crash_handling ();

#ifdef HAVE_RAISE
  raise (SIGSEGV);
#else
  {
    volatile char *p = NULL;
    *p = 'a';
  }
#endif

  return 0;
}