diff options
Diffstat (limited to 'user')
| -rw-r--r-- | user/usertests.c | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/user/usertests.c b/user/usertests.c index 0042fe7..7da62d1 100644 --- a/user/usertests.c +++ b/user/usertests.c @@ -1908,6 +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. +void +pgbug(char *s) +{ +  char *argv[1]; +  argv[0] = 0; +  exec((char*)0xeaeb0b5b00002f5e, argv); +  exit(0); +} +  // run each test in its own process. run returns 1 if child's exit()  // indicates success.  int @@ -1945,6 +1957,7 @@ main(int argc, char *argv[])      void (*f)(char *);      char *s;    } tests[] = { +    {pgbug, "pgbug" },      {reparent, "reparent" },      {twochildren, "twochildren"},      {forkfork, "forkfork"}, | 
