PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
Go to the source code of this file.
Functions | |
void | test_main (void) |
Try to write to the code segment using a system call. More... | |
void test_main | ( | void | ) |
Try to write to the code segment using a system call.
The process must be terminated with -1 exit code.
< Save a copy of the stack pointer.
< Move stack pointer to bottom of page.
< Push 32 bytes on stack at once.
< Restore copied stack pointer.
< Tell GCC we destroyed eax.
Definition at line 8 of file pt-write-code-2.c.
References CHECK, fail(), open(), read(), and test_main().
Referenced by test_main().