|
From: Avery P. <ape...@ni...> - 2003-11-01 20:52:18
|
On Sat, Nov 01, 2003 at 12:33:51PM +0000, Nicholas Nethercote wrote: > Firstly, sorry for taking so long to reply. No problem, thanks for replying at all :) > When the stack grows, the memory from old_esp..new_esp is marked as > accessible, but uninitialised. When the stack shrinks, the memory from > old_esp..new_esp is marked as inaccessible, and uninitialised. I think > this is why you're getting the uninitialised errors. That's what I thought. > Where did you insert the VALGRIND_MAKE_READABLE call? I'm pretty sure > that macro will work on the stack. If I've understood your technique, I > think you want to do this: I don't remember now; I'll play with it some more, see if I can do it properly, and maybe send some sample code. > The critical thing being that you call the macro after you restore %esp. That may be what I was doing wrong. > Also, it's possible that Valgrind thinks your program is switching stacks, > which might be causing the confusion. I don't think so - it started warning me about switching stacks only after I enabled the stack-switch-detection feature, IIRC, and that didn't help. Thanks, Avery |