summaryrefslogtreecommitdiff
path: root/utils/test/main.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-01-06 20:12:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-01-06 20:12:03 +0000
commit9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc (patch)
treedd2a1ddf0476664c2b823409c36cbccd52662ca7 /utils/test/main.c
parent3bd2e91faeb9eeec1aae82c64a3253afff551cfd (diff)
Notes
Diffstat (limited to 'utils/test/main.c')
-rw-r--r--utils/test/main.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/test/main.c b/utils/test/main.c
new file mode 100644
index 000000000000..c0fe2f25a488
--- /dev/null
+++ b/utils/test/main.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+int main(int argc, const char* argv[])
+{
+ int *null_ptr = 0;
+ printf("Hello, fault!\n");
+ u_int32_t val = (arc4random() & 0x0f);
+ printf("val=%u\n", val);
+ if (val == 0x07) // Lucky 7 :-)
+ printf("Now segfault %d\n", *null_ptr);
+ else
+ printf("Better luck next time!\n");
+}