summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-09-20 10:27:03 -0400
committerRobert Morris <[email protected]>2019-09-20 10:27:03 -0400
commitca30cac702157d0d3a2c89e4436f0bff303a6e0a (patch)
tree6adf0e7f93efcda3b477354b0e2e3d6c75b3c419 /user
parent402e7b56053312f4e96737ee7cd82395c998f00f (diff)
downloadxv6-labs-ca30cac702157d0d3a2c89e4436f0bff303a6e0a.tar.gz
xv6-labs-ca30cac702157d0d3a2c89e4436f0bff303a6e0a.tar.bz2
xv6-labs-ca30cac702157d0d3a2c89e4436f0bff303a6e0a.zip
more incorrect cast to uint
Diffstat (limited to 'user')
-rw-r--r--user/usertests.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/user/usertests.c b/user/usertests.c
index 7da62d1..22b01a2 100644
--- a/user/usertests.c
+++ b/user/usertests.c
@@ -1908,15 +1908,18 @@ stacktest(char *s)
exit(xstatus);
}
-// copyinstr() used to cast the virtual page address to uint,
-// which (with certain wild system call arguments) could
-// result in a kernel page fault.
+// copyin(), copyout(), and copyinstr() used to cast the virtual page
+// address to uint, which (with certain wild system call arguments)
+// resulted in a kernel page faults.
void
pgbug(char *s)
{
char *argv[1];
argv[0] = 0;
exec((char*)0xeaeb0b5b00002f5e, argv);
+
+ pipe((int*)0xeaeb0b5b00002f5e);
+
exit(0);
}