[pull] master from golang:master#25
Merged
pull[bot] merged 2 commits intotrailofbits:masterfrom May 9, 2026
Merged
Conversation
When compiling a package, when there are duplicated symbols (probably due to a bug in the compiler), we try to print the source locations of the two definitions. However, if one has its Func().Text unset, it panics. Guard it with a nil check, so at least it can print the function name. Change-Id: I7a851970edc71dc2c8c9d694174bac42ea9c75d6 Reviewed-on: https://go-review.googlesource.com/c/go/+/775623 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Bypass: Cherry Mui <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com>
When building the name for closures, in order to make sure each closure has a unique name, we attach a hash of the inline call stack. We currently use a combination of function name, line number, and column number at each level to construct the hash. In some situations, this may not be able to uniquely identify the call stack: there could be multiple inline call sites at the same line of different files (we currently don't include the file name), and XPos.ColumnNumber can saturate. This could lead to duplicate symbol definitions. Instead of using name + line number + column number, switch to use the global inline tree index, which should uniquely identify the call site at each level. Fixes #79274. Change-Id: I69110a212d6b856283aae4c999258ae585be5977 Reviewed-on: https://go-review.googlesource.com/c/go/+/775624 Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )