summaryrefslogtreecommitdiff
path: root/usertests.c
diff options
context:
space:
mode:
authorrsc <rsc>2007-09-27 05:13:10 +0000
committerrsc <rsc>2007-09-27 05:13:10 +0000
commit666f58c711eafbdccb8abfe530b935505ab6eaa6 (patch)
tree07b6b693d5087b2237cceef262f0d934f2536cc3 /usertests.c
parent90d975e9c8a540efb380435f0dfc1369bad684ae (diff)
downloadxv6-labs-666f58c711eafbdccb8abfe530b935505ab6eaa6.tar.gz
xv6-labs-666f58c711eafbdccb8abfe530b935505ab6eaa6.tar.bz2
xv6-labs-666f58c711eafbdccb8abfe530b935505ab6eaa6.zip
believe it or not, this was working
the macro expansion of "char *cp;" turned into char *(curproc[cpu()]); which declares a dynamically sized array of char* called curproc. so then &cp == &(curproc[cpu()]) was actually a stack variable as "expected". it was one past the end of the array, but the implicit alloca allocated more than was necessary. do not tell me that making cp a #define was a bad idea. there are worse problems to fix. more on that later.
Diffstat (limited to 'usertests.c')
-rw-r--r--usertests.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usertests.c b/usertests.c
index 2b35b8f..9be2764 100644
--- a/usertests.c
+++ b/usertests.c
@@ -1234,7 +1234,9 @@ int
main(int argc, char *argv[])
{
printf(1, "usertests starting\n");
-
+
+for(;;) concreate();
+
if(open("usertests.ran", 0) >= 0){
printf(1, "already ran user tests -- rebuild fs.img\n");
exit();