|
From: Julian S. <js...@ac...> - 2007-11-08 12:55:25
|
> I assume that valgrind can not track history of accesses to all memory > addresses with corresponding stacks. Too expensive. True. > May be it can keep such history for those addresses where a race has been > detected? That could be possible at reasonable cost. > But it will not help if the memory was accessed only once in the first > thread. True. Oh well. > Another way is to run valgrind twice -- the first run will act as usual and > the second run will take the report of the first one and treat addresses in > the report specially. Though, of course, running valgrind twice is not fun. > What I would like to see is: > ==30205== Possible data race during write of size 4 at 0x5C52028 You can sort-of do this already. Rerun with --trace-addr=0x5C52028 and --trace-level=1. This will give you a 1-line summary for each access to 0x5C52028. At --trace-level=2 you get a complete stack trace. I would be interested to know if that is useful. J |