From: Cherry Zhang Date: Thu, 18 Mar 2021 03:55:07 +0000 (-0400) Subject: cmd/link: print symbol versions in stack bound check X-Git-Tag: go1.17beta1~1068 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=db4adb1a9ba2ecd8809aab9bf26cc25d2f0c877b;p=gostls13.git cmd/link: print symbol versions in stack bound check When the stack bound check fails, print the call chain with symbol versions (along with the names). Now that we have ABI wrappers and wrappers do consume stack space, it is clearer to distinguish the wrappers vs. the underlying functions. Change-Id: Id1d922e3e7934b31317f233aff3d9667b6ac90c8 Reviewed-on: https://go-review.googlesource.com/c/go/+/302869 Trust: Cherry Zhang Run-TryBot: Cherry Zhang TryBot-Result: Go Bot Reviewed-by: Than McIntosh --- diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go index 4c69d24354..500dca2b8b 100644 --- a/src/cmd/link/internal/ld/lib.go +++ b/src/cmd/link/internal/ld/lib.go @@ -2416,7 +2416,7 @@ func (sc *stkChk) print(ch *chain, limit int) { ctxt := sc.ctxt var name string if ch.sym != 0 { - name = ldr.SymName(ch.sym) + name = fmt.Sprintf("%s<%d>", ldr.SymName(ch.sym), ldr.SymVersion(ch.sym)) if ldr.IsNoSplit(ch.sym) { name += " (nosplit)" }