CS318 - Pintos
Pintos source browser for JHU CS318 course
|
Go to the source code of this file.
Functions | |
void | test_main (void) |
Try to write to the code segment. More... | |
void test_main | ( | void | ) |
Try to write to the code segment.
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.c.
References buf, CHECK, CHILD_CNT, close(), create(), exec_children(), fail(), file_name, msg(), open(), random_bytes(), wait_children(), and write().