mirror of
https://github.com/golang/go
synced 2024-11-23 04:30:03 -07:00
f0de94ff12
Runtime functions, e.g. internal/abi.NoEscape, should not be instrumented with checkptr. But if they are inlined into a checkptr-enabled function, they will be instrumented, and may result in a check failure. Let the compiler not inline runtime functions into checkptr- enabled functions. Also undo the change in the strings package in CL 598295, as the compiler handles it now. Fixes #68511. Updates #68415. Change-Id: I78eb380855ac9dd53c1a1a628ec0da75c3e5a1a0 Reviewed-on: https://go-review.googlesource.com/c/go/+/599435 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@google.com>
20 lines
353 B
Go
20 lines
353 B
Go
// run -gcflags=all=-d=checkptr
|
|
|
|
// Copyright 2024 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
import (
|
|
"regexp"
|
|
"unique"
|
|
)
|
|
|
|
var dataFileRegexp = regexp.MustCompile(`^data\.\d+\.bin$`)
|
|
|
|
func main() {
|
|
_ = dataFileRegexp
|
|
unique.Make("")
|
|
}
|