From d037bba19b26064dcbd19be2c17e042c8d421f2c Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Wed, 24 Apr 2024 11:31:19 -0400 Subject: cmd/compile: add debug log prior to export data lookup If there is a crash in LookupFunc (which has occurred a few times now), this ensures that we log the offending symbol before crashing. For #67016. Change-Id: I0119597de2be3d1b97c41a9361273d1feb90ec11 Reviewed-on: https://go-review.googlesource.com/c/go/+/581437 Reviewed-by: Cherry Mui Reviewed-by: Than McIntosh LUCI-TryBot-Result: Go LUCI --- src/cmd/compile/internal/pgoir/irgraph.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cmd/compile/internal/pgoir/irgraph.go b/src/cmd/compile/internal/pgoir/irgraph.go index cb4333e6d7..f1c8d13dec 100644 --- a/src/cmd/compile/internal/pgoir/irgraph.go +++ b/src/cmd/compile/internal/pgoir/irgraph.go @@ -333,6 +333,9 @@ func addIndirectEdges(g *IRGraph, namedEdgeMap pgo.NamedEdgeMap) { // devirtualization. Instantiation of generic functions // will likely need to be done at the devirtualization // site, if at all. + if base.Debug.PGODebug >= 3 { + fmt.Printf("addIndirectEdges: %s attempting export data lookup\n", key.CalleeName) + } fn, err := LookupFunc(key.CalleeName) if err == nil { if base.Debug.PGODebug >= 3 { -- cgit v1.2.3-54-g00ecf