Skip to content
Snippets Groups Projects
Commit c1fc209c authored by Keith Randall's avatar Keith Randall Committed by Gopher Robot
Browse files

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: default avatarKeith 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: default avatarDmitry Vyukov <dvyukov@google.com>
parent 9d0320de
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment