Index: sc-bad-sp.c =================================================================== RCS file: /home/staff/gback/cvs/pintos-fall2006/src/tests/userprog/sc-bad-sp.c,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 sc-bad-sp.c --- sc-bad-sp.c 22 Aug 2006 23:12:57 -0000 1.1.1.1 +++ sc-bad-sp.c 8 Nov 2006 01:15:17 -0000 @@ -1,6 +1,15 @@ /* Invokes a system call with the stack pointer (%esp) set to a bad address. The process must be terminated with -1 exit - code. */ + code. + + For Project 3: + Since the bad address lies approximately 64MB below the code + segment, there is no ambiguity that this attempt must + be rejected even after stack growth is implemented. + Moreover, a good stack growth heuristics should probably + not grow the stack for the purpose of reading the system call + number and arguments. + */ #include "tests/lib.h" #include "tests/main.h" @@ -8,6 +17,6 @@ void test_main (void) { - asm volatile ("movl $0x20101234, %esp; int $0x30"); + asm volatile ("movl . - (64*1024*1024), %esp; int $0x30"); fail ("should have called exit(-1)"); }