golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.09k stars 17.68k forks source link

runtime/race: say where the memory block was allocated #6690

Open dvyukov opened 11 years ago

dvyukov commented 11 years ago
C++ ThreadSanitizer describes where the memory involved in report was allocated:
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/malloc_stack.cc?revision=187875&;view=markup

It would be useful to do the same for Go.

C++ ThreadSanitizer can also pronounce the name of the global (if the race in on
global). Look if it's possible in Go.
rsc commented 10 years ago

Comment 1:

Labels changed: added go1.3maybe.

rsc commented 10 years ago

Comment 2:

Labels changed: added release-none, removed go1.3maybe.

rsc commented 10 years ago

Comment 3:

Labels changed: added repo-main.

gopherbot commented 8 years ago

CL https://golang.org/cl/19958 mentions this issue.

dvyukov commented 8 years ago

Current state: https://golang.org/cl/19958 is too complex, we need to prototype an approach with threading of PC through allocation functions. It may lead to much simpler code.