]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: print symbol versions in stack bound check
authorCherry Zhang <cherryyz@google.com>
Thu, 18 Mar 2021 03:55:07 +0000 (23:55 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 18 Mar 2021 14:09:57 +0000 (14:09 +0000)
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 <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/ld/lib.go

index 4c69d24354fc4c09567ebfeec4860b62085a822e..500dca2b8b961b03cc722c1a5f6de2370d1091b9 100644 (file)
@@ -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)"
                }