Hi Dave, Thanks for the response. I assumed that this was the memory location of variable and not the program counter.
Cheers On Tue, Jun 27, 2017 at 4:48 PM, Dave Cheney <[email protected]> wrote: > > > On Tuesday, 27 June 2017 20:53:57 UTC+10, Abhijeet Rastogi wrote: >> >> Hi everyone, >> >> Let's suppose I have this race detector output:- >> >> ================== >> >> WARNING: DATA RACE >> >> Write at 0x00c4202fc000 by goroutine 24: >> >> main.(*Host).refreshIP.func2() >> >> /path/to/code/host.go:195 +0xa0 >> >> >> Previous write at 0x00c4202fc000 by goroutine 21: >> >> main.(*Host).refreshIP.func1() >> >> /path/to/code/host.go:188 +0xa0 >> >> >> Goroutine 24 (running) created at: >> >> main.(*Host).refreshIP() >> >> /path/to/code/host.go:200 +0x288 >> >> >> Goroutine 21 (finished) created at: >> >> main.(*Host).refreshIP() >> >> /path/to/code/host.go:193 +0x221 >> >> >> >> Now, If at host.go:195, I have a line like this:- >> >> >> a, b, c = foobar(foo) >> > > a, b, and or c are declared at the package level. > > >> >> I know that it's one or more of these variables that are causing the race >> condition but to make things even more simpler. Is there a way for me to >> figure out what's at memory location 0x00c4202fc000? >> > > No, the memory location is not important because that is the program > counter for _one_ of the code paths that caused the data race. There will > be at least one more, so which one gets fingered is arbitrary. Use the line > numbers reported to pinpoint the variable in question. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Cheers, Abhijeet Rastogi (shadyabhi) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
