]> Cypherpunks repositories - gostls13.git/commitdiff
doc: add description of new framepointer vet check
authorKeith Randall <khr@golang.org>
Tue, 8 Dec 2020 22:35:41 +0000 (14:35 -0800)
committerKeith Randall <khr@golang.org>
Wed, 9 Dec 2020 01:34:53 +0000 (01:34 +0000)
Update #43014

Change-Id: I5fbfaa16e6acb8859fd0b1188f532f5a225f6349
Reviewed-on: https://go-review.googlesource.com/c/go/+/276373
Trust: Keith Randall <khr@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
doc/go1.16.html

index 012be1656f2fe0d6b29906a597f7800900287d0b..504165f3eaee17bc607ea4a30651d42f2e57b2b4 100644 (file)
@@ -293,6 +293,18 @@ Do not send CLs removing the interior tags from such phrases.
   <!-- CL 235677: https://golang.org/cl/235677: cmd/vet: bring in pass to catch invalid uses of testing.T in goroutines -->
 </p>
 
+<p><!-- CL 248686, CL 276372 -->
+  The vet tool now warns about amd64 assembly that clobbers the BP
+  register (the frame pointer) without saving and restoring it,
+  contrary to the calling convention. Code that doesn't preserve the
+  BP register must be modified to either not use BP at all or preserve
+  BP by saving and restoring it. An easy way to preserve BP is to set
+  the frame size to a nonzero value, which causes the generated
+  prologue and epilogue to preserve the BP register for you.
+  See <a href="https://golang.org/cl/248260">CL 248260</a> for example
+  fixes.
+</p>
+
 <h2 id="runtime">Runtime</h2>
 
 <p>