I have the following Puzzle to solve and I am not really sure how I could do that. It says:
There's an Ubuntu Linux C program which outputs the addresses of variables.
v1: 0xa156128
v2: 0xff97410c
v3: 0xf750e34b
v4: 0x804a0c0
I know that the program uses no shared memory and at least one of those variables is a heap variable. Which one of those variables are global
/ local
/ heap
.
That's all the information available and I am really interested in any ideas towards solving this puzzle.
Edit after reading comments:
If I look at the Runtime - Storage Organization link (http://lambda.uta.edu/cse5317/notes/node33.html) there it seems likely that v2
and v3
are the local variables for having the biggest address, v1
being the heap variable since it's between stack and static data and v4
being the global variable which doesn't get declared on the stack at runtime like the locals, but rather in the .data section of the binary.