I have 2 array of type Char in the main() as shown below :
char a[8]="aaaaaaaa";
char b[8] = "bbbbbbbb";
When I print value of &a and &b, I got 0x7ffeefbffa40 and 0x7ffeefbffa38 respectively from gdb. However when I did Info frame, I got the following :
Stack level 0, frame at 0x7ffeefbffa60:
rip = 0x100003e0a in main (bufferoverflowex1.c:8); saved rip = 0x7fff20395621
source language c.
Arglist at 0x7ffeefbffa50, args:
Locals at 0x7ffeefbffa50, Previous frame's sp is 0x7ffeefbffa60
Saved registers:
rbp at 0x7ffeefbffa50, rip at 0x7ffeefbffa58
I am confused with the value of Locals. It is xxxxffa50. However the addresses of local variables are xxxx40 and xxxx38. How is it possible that variables are stored at the address previous to Locals address returned by info frame ?