|
From: Bryan M. <om...@br...> - 2005-11-12 14:17:12
|
Nope - didn't help - exactly the same behaviour. I'll try something with the instrumentation so I cache the die_stack parameters then act on them just before the jump instruction at the block end. If there is more than one die_stack call, I'll see what the parameters are and if there is a sensible way to handle it. Bryan "Brain Murders" Meredith On Saturday 12 Nov 2005 12:13, Julian Seward wrote: > > Try --vex-iropt-precise-memory-exns=no. The flag is mis-named, but it > might do what you want. > > J > > On Saturday 12 November 2005 11:21, Bryan Meredith wrote: > > I have found the problem. > > > > Basically, there is a little bit in the documentation for VEX that states > > that the simulated PC registers are updated lazily, apart from the stack > > pointer which is updated immediately. > > > > The problem I am having is that when the die_stack function is called, the > > simulated processor registers are not in a consistant state: > > > > read from stack -> register(real) > > move SP (real) > > SP(real) -> SP(sim) > > call die_stack() > > register(real) -> register(sim) > > > > Because the value on the stack is the last reference to an allocated block > > that I am tracking, when die_stack is called, I note that the reference > > dies and raise a leak report. However, this is not the last reference as if > > the stack ->reg(real) reg(real)->reg(sim) had occurred, I would have > > tracked the value there and not leaked. > > > > So, two ways of fixing this I think (open to suggestions as ever): > > > > Tweak VEX so that pending register(sim) updates are flushed before the > > SP(sim) is written. > > Trap the stack change but don't act until the basic block ends so that > > registers(sim) are consistant. > > > > For the second one to work, I have to assume that the stack pointer is only > > moved up once in a basic block. I havent done any x86 assembler previously > > so I dont know how sensible an assumption this is. > > > > Any help / advice appreciated. > > > > thanks, > > Bryan "Brain Murders" Meredith > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: > > Tame your development challenges with Apache's Geronimo App Server. > > Download it for free - -and be entered to win a 42" plasma tv or your very > > own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > > _______________________________________________ > > Valgrind-developers mailing list > > Val...@li... > > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |