c - How can an argument be different in the caller and the callee? -
i'm debugging program , ran across i've never seen before. below excerpt gdb
.
1236 size = init_text_buffer(fn); (gdb) p fn $13 = 0x7fff1cd22d80 "-" (gdb) s init_text_buffer (fn=0xd00 <error: cannot access memory @ address 0xd00>) @ editors/vi.c:720 720 {
the function init_text_buffer
called char
pointer value 0x7fff78136bd0
. step function argument suddently has different value.
what possible causes of this? i'm not asking debug code (i didn't include how you?), need pointer in right direction. thing has left me no clues @ all.
you should go hybrid assembly mode (ctrl+x 2) , stepi examine instructions being performed. had - in case optimization c code of course didn't reveal. in case, reveal memory overrun.
worth shot.
Comments
Post a Comment