CS318 - Pintos
Pintos source browser for JHU CS318 course
Functions
pt-write-code-2.c File Reference
#include "tests/lib.h"
#include "tests/main.h"
Include dependency graph for pt-write-code-2.c:

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...
 

Function Documentation

◆ test_main()

void test_main ( void  )

Try to write to the code segment using a system call.

tests/main.h

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(), and read().

Here is the call graph for this function: