Stevens Institute of Technology - Department of Computer Science

CS631 Week 06 Checkpoint

To help you get the most out of this class, please fill out this short form after completing the materials and exercises for week 06.


Please enter your full name:

Please enter your Stevens username:

Consider the following program:
int a;
char *s;
char buf[1024];

int
main(int argc, char **argv) {
	int b;
	char *string = "abcd";
}
For each variable, identify which memory segment (text, initialized data, bss, heap, stack, high address) it is allocated in.

What is the difference between a buffer overflow and a stack overflow?

Go through the Program Startup Exercise.
How similar / different is the Linux startup compared to the one you've seen on NetBSD?

What is the return value of the following program:
int func2() { _exit(0xcafe); }
int func() { exit(func2()); }
int main(int argc, char **argv) { printf("%d\n", func()); }

Under what circumstances might malloc return NULL?

What system call does a parent process use to determine a child process's PID?

What's your favorite zombie movie?