mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2025-12-22 09:00:17 +01:00
It's only used in test code. We have to put it in its own translation unit with no non-libc dependencies so that we can compile a copy of it without AddressSanitizer support, because in a subsequent commit we will special-case test-segfault to be compiled without using AddressSanitizer, which would make linking to an AddressSanitizer-instrumented libdbus fail. Signed-off-by: Simon McVittie <smcv@collabora.com>
24 lines
342 B
C
24 lines
342 B
C
/* 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;
|
|
}
|