summaryrefslogtreecommitdiff
path: root/user/usertests.c
diff options
context:
space:
mode:
Diffstat (limited to 'user/usertests.c')
-rw-r--r--user/usertests.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/user/usertests.c b/user/usertests.c
index e6a39b9..85a54d2 100644
--- a/user/usertests.c
+++ b/user/usertests.c
@@ -2591,6 +2591,16 @@ sbrklast(char *s)
exit(1);
}
+// does sbrk handle signed int32 wrap-around with
+// negative arguments?
+void
+sbrk8000(char *s)
+{
+ sbrk(0x80000004);
+ volatile char *top = sbrk(0);
+ *(top-1) = *(top-1) + 1;
+}
+
// regression test. does write() with an invalid buffer pointer cause
// a block to be allocated for a file that is then not freed when the
// file is deleted? if the kernel has this bug, it will panic: balloc:
@@ -2832,6 +2842,7 @@ main(int argc, char *argv[])
{sbrkfail, "sbrkfail"},
{sbrkarg, "sbrkarg"},
{sbrklast, "sbrklast"},
+ {sbrk8000, "sbrk8000"},
{validatetest, "validatetest"},
{stacktest, "stacktest"},
{opentest, "opentest"},