diff options
| author | Keith Randall <khr@golang.org> | 2025-04-23 14:15:51 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-04-23 23:22:12 -0700 |
| commit | c1fc209c41c18806b7cef1cf114f1ca9b3731eb9 (patch) | |
| tree | 114e29f716a776314195b3c4769ada19b024b5a1 /src/runtime/debug/example_monitor_test.go | |
| parent | 9d0320de2574586f3b0610c1b5fd15b8f9c85dec (diff) | |
| download | go-c1fc209c41c18806b7cef1cf114f1ca9b3731eb9.tar.xz | |
runtime: use precise bounds of Go data/bss for race detector
We only want to call into the race detector for Go global variables.
By rounding up the region bounds, we can include some C globals.
Even worse, we can include only *part* of a C global, leading to
race{read,write}range calls which straddle the end of shadow memory.
That causes the race detector to barf.
Fix some off-by-one errors in the assembly comparisons. We want to
skip calling the race detector when addr == racedataend.
Fixes #73483
Change-Id: I436b0f588d6165b61f30cb7653016ba9b7cbf585
Reviewed-on: https://go-review.googlesource.com/c/go/+/667655
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Diffstat (limited to 'src/runtime/debug/example_monitor_test.go')
0 files changed, 0 insertions, 0 deletions
