dbus/test/test-segfault.c
Joe Shaw 496f1e18a9 2003-06-15 Joe Shaw <joe@assbarn.com>
* configure.in: Check for socklen_t.

	* dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.

	* test/test-segfault.c: Add #include <sys/time.h>

	* tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
	dbus-launch needs it.
2003-06-15 10:45:07 +00:00

24 lines
337 B
C

/* This is simply a process that segfaults */
#include <signal.h>
#include <sys/time.h>
#include <sys/resource.h>
int
main (int argc, char **argv)
{
char *p;
struct rlimit r = { 0, };
getrlimit (RLIMIT_CORE, &r);
r.rlim_cur = 0;
setrlimit (RLIMIT_CORE, &r);
raise (SIGSEGV);
p = 0;
*p = 'a';
return 0;
}