X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Ftests%2Fuserprog%2Fsc-bad-sp.c;h=56a5b8d4b8ee09a00a26875cfae44848215755d7;hb=17102846d22591590c37548f8514067e2be6c5f6;hp=8c42298d7df40149e343cf326ef408cb262913fb;hpb=615bf3b3d2a8573ed6fb9ddc0055745e163ac999;p=pintos-anon diff --git a/src/tests/userprog/sc-bad-sp.c b/src/tests/userprog/sc-bad-sp.c index 8c42298..56a5b8d 100644 --- a/src/tests/userprog/sc-bad-sp.c +++ b/src/tests/userprog/sc-bad-sp.c @@ -1,9 +1,13 @@ +/* Invokes a system call with the stack pointer (%esp) set to a + bad address. The process must be terminated with -1 exit + code. */ + #include "tests/lib.h" #include "tests/main.h" void test_main (void) { - asm volatile ("mov %esp, 0x20101234; int 0x30"); + asm volatile ("movl $0x20101234, %esp; int $0x30"); fail ("should have called exit(-1)"); }