go/src/runtime/race
Dmitry Vyukov 38765eba73 runtime/race: don't crash on invalid PCs
Currently raceSymbolizeCode uses funcline, which is internal runtime
function which crashes on incorrect PCs. Use FileLine instead,
it is public and does not crash on invalid data.

Note: FileLine returns "?" file on failure. That string is not NUL-terminated,
so we need to additionally check what FileLine returns.

Fixes #17190

Change-Id: Ic6fbd4f0e68ddd52e9b2dd25e625b50adcb69a98
Reviewed-on: https://go-review.googlesource.com/29714
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-09-25 12:22:04 +00:00
..
testdata all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
README runtime/race: fix memory leak 2016-07-20 14:17:44 +00:00
doc.go
output_test.go runtime/race: don't crash on invalid PCs 2016-09-25 12:22:04 +00:00
race.go
race_darwin_amd64.syso runtime/race: fix memory leak 2016-07-20 14:17:44 +00:00
race_freebsd_amd64.syso runtime/race: fix memory leak 2016-07-20 14:17:44 +00:00
race_linux_amd64.syso runtime/race: fix memory leak 2016-07-20 14:17:44 +00:00
race_linux_test.go runtime: fix race atomic operations on external memory 2016-06-29 15:30:54 +00:00
race_test.go all: use testing.GoToolPath instead of "go" 2016-08-30 22:49:11 +00:00
race_unix_test.go
race_windows_amd64.syso runtime/race: fix memory leak 2016-07-20 14:17:44 +00:00
race_windows_test.go runtime: fix race atomic operations on external memory 2016-06-29 15:30:54 +00:00
sched_test.go

README

runtime/race package contains the data race detector runtime library.
It is based on ThreadSanitizer race detector, that is currently a part of
the LLVM project (http://llvm.org/git/compiler-rt.git).

To update the .syso files use golang.org/x/build/cmd/racebuild.

Current runtime is built on rev e35e7c00b5c7e7ee5e24d537b80cb0d34cebb038.