dbus/test/test-segfault.c
Simon McVittie 77327b7bd8 _dbus_disable_crash_handling: Factor out from test-segfault
Signed-off-by: Simon McVittie <smcv@collabora.com>
2018-11-20 12:58:17 +00:00

24 lines
337 B
C

/* This is simply a process that segfaults */
#include <config.h>
#include <stdlib.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#include "dbus/dbus-sysdeps.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;
}