From ae9b442df2436b3d65ef765572681bf9aacdfbbb Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Tue, 8 Dec 2020 14:35:41 -0800 Subject: [PATCH] doc: add description of new framepointer vet check Update #43014 Change-Id: I5fbfaa16e6acb8859fd0b1188f532f5a225f6349 Reviewed-on: https://go-review.googlesource.com/c/go/+/276373 Trust: Keith Randall Reviewed-by: Dmitri Shuralyov --- doc/go1.16.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/go1.16.html b/doc/go1.16.html index 012be1656f..504165f3ea 100644 --- a/doc/go1.16.html +++ b/doc/go1.16.html @@ -293,6 +293,18 @@ Do not send CLs removing the interior tags from such phrases.

+

+ 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 CL 248260 for example + fixes. +

+

Runtime

-- 2.48.1