00001 /* Sticks a system call number (SYS_EXIT) at the very top of the 00002 stack, then invokes a system call with the stack pointer 00003 (%esp) set to its address. The process must be terminated 00004 with -1 exit code because the argument to the system call 00005 would be above the top of the user address space. */ 00006 00007 #include <syscall-nr.h> 00008 #include "tests/lib.h" 00009 #include "tests/main.h" 00010 00011 void 00012 test_main (void) 00013 { 00014 asm volatile ("movl $0xbffffffc, %%esp; movl %0, (%%esp); int $0x30" 00015 : : "i" (SYS_EXIT)); 00016 fail ("should have called exit(-1)"); 00017 }