|
From: Tom H. <th...@cy...> - 2004-08-26 13:12:04
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> Valgrind approximately attempts to supply a POSIX-compliant environment
> in which programs can run -- that's really the design goal. I'm sure that
> looking at machine registers following an exception isn't POSIX compliant
> -- POSIX doesn't even guarantee precise exceptions, AIUI. Let alone have
> any notion of machine registers.
Actually POSIX (or at least SuS) does say that si_addr will be the
address of the faulting instruction - see the section on siginfo_t in:
http://www.opengroup.org/onlinepubs/009695399/basedefs/signal.h.html
I'm not sure how that interacts with platforms like the Alpha where
floating point exceptions are not normally precise even in normal use.
> No. Future valgrinds may optimise code more aggressively than at
> present, which will likely make this problem worse rather than better.
> Even at present, Valgrind only guarantees to update the integer/FP/SSE/
> register/flag state at each jump, so at an exception you will usually
> be seeing machine state which is many instructions out of date.
He wasn't actually talking about the saved registers, and the integer
registers are always up to date aren't they? I thought it was only the
floating point ones that weren't.
The point is that si_addr doesn't match the EIP in the register set
valgrind supplies because we update one and not the other.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|