[go] cmd/compile: don't inline runtime functions in -d=checkptr build

0 views
Skip to first unread message

Cherry Mui (Gerrit)

unread,
11:45 AM (7 hours ago) 11:45 AM
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Keith Randall, Keith Randall, Cuong Manh Le, golang-co...@googlegroups.com

Cherry Mui submitted the change with unreviewed changes

Unreviewed changes

2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: src/cmd/internal/objabi/pkgspecial.go
Insertions: 2, Deletions: 0.

@@ -18,6 +18,8 @@
//
// - Optimizations are always enabled.
//
+ // - Checkptr is always disabled.
+ //
// This should be set for runtime and all packages it imports, and may be
// set for additional packages.
Runtime bool
```

Change information

Commit message:
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-by: Keith Randall <k...@golang.org>
Reviewed-by: Cuong Manh Le <cuong.m...@gmail.com>
Reviewed-by: Keith Randall <k...@google.com>
Files:
  • M src/cmd/compile/internal/inline/inl.go
  • M src/cmd/compile/internal/types/type.go
  • M src/cmd/internal/objabi/pkgspecial.go
  • M src/strings/builder.go
  • M test/fixedbugs/issue68415.go
Change size: S
Delta: 5 files changed, 22 insertions(+), 14 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Cuong Manh Le, +1 by Keith Randall, +2 by Keith Randall
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I78eb380855ac9dd53c1a1a628ec0da75c3e5a1a0
Gerrit-Change-Number: 599435
Gerrit-PatchSet: 4
Gerrit-Owner: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cherry Mui <cher...@google.com>
Gerrit-Reviewer: Cuong Manh Le <cuong.m...@gmail.com>
Gerrit-Reviewer: Keith Randall <k...@golang.org>
Gerrit-Reviewer: Keith Randall <k...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages