aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2025-04-16 13:50:44 -0700
committerKeith Randall <khr@golang.org>2025-05-22 15:10:44 -0700
commitaec96d686be16fda519f6fd4a6e3bbfe3454c0b9 (patch)
treef28a6731fefd423cac23dfb2df6a6c27ca5f7ffa
parentc684dfcb8a8fe38a8414bfd07b94e9995e5cd308 (diff)
downloadgo-aec96d686be16fda519f6fd4a6e3bbfe3454c0b9.tar.xz
doc: mention stack allocation of variable-sized make calls
Also mention the bisect tool and flag used to track down incorrect uses. Change-Id: Id36a236e1bb2733b8611b22a5b16916e7d9f5522 Reviewed-on: https://go-review.googlesource.com/c/go/+/666075 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
-rw-r--r--doc/next/5-toolchain.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/next/5-toolchain.md b/doc/next/5-toolchain.md
index c270e9dfc9..3708700c93 100644
--- a/doc/next/5-toolchain.md
+++ b/doc/next/5-toolchain.md
@@ -38,6 +38,18 @@ successfully in Go 1.25. If this change is affecting your code, the solution is
the non-nil error check earlier in your code, preferably immediately after
the error-generating statement.
+<!-- CLs 653856, 657937, 663795, TBD 664299 -->
+
+The compiler can now allocate the backing store for slices on the
+stack in more situations, which improves performance. This change has
+the potential to amplify the effects of incorrect
+[unsafe.Pointer](/pkg/unsafe#Pointer) usage, see for example [issue
+73199](/issue/73199). In order to track down these problems, the
+[bisect tool](https://pkg.go.dev/golang.org/x/tools/cmd/bisect) can be
+used to find the allocation causing trouble using the
+`-compile=variablemake` flag. All such new stack allocations can also
+be turned off using `-gcflags=all=-d=variablemakehash=n`.
+
## Assembler {#assembler}
## Linker {#linker}