00001 /* Invokes a system call with the stack pointer (%esp) set to a 00002 bad address. The process must be terminated with -1 exit 00003 code. 00004 00005 For Project 3: The bad address lies approximately 64MB below 00006 the code segment, so there is no ambiguity that this attempt 00007 must be rejected even after stack growth is implemented. 00008 Moreover, a good stack growth heuristics should probably not 00009 grow the stack for the purpose of reading the system call 00010 number and arguments. */ 00011 00012 #include "tests/lib.h" 00013 #include "tests/main.h" 00014 00015 void 00016 test_main (void) 00017 { 00018 asm volatile ("movl $.-(64*1024*1024), %esp; int $0x30"); 00019 fail ("should have called exit(-1)"); 00020 }