mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: disable pacer lock held assertions in tests
Fixes #49234. Change-Id: I64c1eab0dce2bbe990343b43a32858a6c9f3dcda Reviewed-on: https://go-review.googlesource.com/c/go/+/359878 Trust: Michael Knyszek <mknyszek@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
2bcf1c0373
commit
b5a5b7bfb1
2 changed files with 13 additions and 3 deletions
|
|
@ -1246,6 +1246,7 @@ func NewGCController(gcPercent int) *GCController {
|
|||
// on a 32-bit architecture, it may get allocated unaligned
|
||||
// space.
|
||||
g := escape(new(GCController)).(*GCController)
|
||||
g.gcControllerState.test = true // Mark it as a test copy.
|
||||
g.init(int32(gcPercent))
|
||||
return g
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue