]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't inline runtime functions in -d=checkptr build
authorCherry Mui <cherryyz@google.com>
Thu, 18 Jul 2024 18:51:34 +0000 (14:51 -0400)
committerCherry Mui <cherryyz@google.com>
Mon, 22 Jul 2024 15:45:09 +0000 (15:45 +0000)
commitf0de94ff127db9b53f3f5877088d28afe1a85692
tree8907669bc3c868c824d38112ae80cf69f1efc1e6
parent3959d54c0bd5c92fe0a5e33fedb0595723efc23b
cmd/compile: don't inline runtime functions in -d=checkptr build

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>
src/cmd/compile/internal/inline/inl.go
src/cmd/compile/internal/types/type.go
src/cmd/internal/objabi/pkgspecial.go
src/strings/builder.go
test/fixedbugs/issue68415.go