summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2021-07-02 14:24:45 -0400
committerRobert Morris <[email protected]>2021-07-02 14:24:45 -0400
commit08c9eda85fe68b8f311494d4cf78cfacda06868d (patch)
treed594946152261cb566a8e3a831ce312455c736fa /user
parent1841baa3dd04ca34b5c7d31169ee6735cc35447f (diff)
downloadxv6-labs-08c9eda85fe68b8f311494d4cf78cfacda06868d.tar.gz
xv6-labs-08c9eda85fe68b8f311494d4cf78cfacda06868d.tar.bz2
xv6-labs-08c9eda85fe68b8f311494d4cf78cfacda06868d.zip
sync usertests
Diffstat (limited to 'user')
-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"},