aboutsummaryrefslogtreecommitdiff
path: root/user/usr/bin/segfault.S
diff options
context:
space:
mode:
Diffstat (limited to 'user/usr/bin/segfault.S')
-rw-r--r--user/usr/bin/segfault.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/user/usr/bin/segfault.S b/user/usr/bin/segfault.S
new file mode 100644
index 0000000..e37f39a
--- /dev/null
+++ b/user/usr/bin/segfault.S
@@ -0,0 +1,12 @@
+/*
+ * An extremely simple test binary. It relies on your
+ * process text and stack being mapped in (and hence vmmap_map
+ * code working) but otherwise has even fewer dependencies than
+ * hello. It should almost immediately segfault.
+ */
+
+.globl main
+main:
+ xor %eax, %eax;
+ mov (%eax), %eax;
+ ret;