Commit 4bc847d8 authored by Ian Lance Taylor's avatar Ian Lance Taylor Committed by Andrew Bonventre
Browse files

[release-branch.go1.10] cmd/go: if -race, don't run coverage on runtime packages

Don't compile the runtime packages with coverage when using the race
detector. The user can, perhaps accidentally, request coverage for the
runtime by using -coverpkg=all. If using the race detector, the
runtime package coverage will call into the race detector before it
has been initialized. This will cause the program to crash
mysteriously on startup.

Fixes #23882

Change-Id: I9a63867a9138797d8b8afb0856ae21079accdb27
Reviewed-on: https://go-review.googlesource.com/94898


Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarAndrew Bonventre <andybons@golang.org>
Reviewed-on: https://go-review.googlesource.com/103095


Run-TryBot: Andrew Bonventre <andybons@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent c917b3c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment