|
From: Jeremy F. <je...@go...> - 2003-09-01 20:44:08
|
On Thu, 2003-08-28 at 19:47, Brian Mosher wrote: > I see that the offending code is at address 0x4145D874. What I am missing is > the memory address of the *data* that is being used. Is there any way to get > valgrind to report the data address? I've looked in the docs, and tried a > number of various switches to no avail. The trouble is that Valgrind doesn't know what the address is - there may not be one. It's talking about a value your program tried to operate on, which is probably in a register when it caused the problem. Since memcheck doesn't track every value transfer, it doesn't know where that value came from at the time the error happened, so the best it can do is report what it knows. The value may not even be in memory, since it could be a temporary result of a calculation which had some undefined inputs, and the result is undefined but different from all its inputs. In these cases, the best thing to do is look at the code in question and add #include <valgrind/memcheck.h> [...] VALGRIND_CHECK_DEFINED(variable); to all relevant-looking variables and see what happens. This should help you track it down. J |