Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/internal/stack: hyphenated identifiers not supported #39762

Open
shri-zz opened this issue Jun 22, 2020 · 1 comment
Open

x/tools/internal/stack: hyphenated identifiers not supported #39762

shri-zz opened this issue Jun 22, 2020 · 1 comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@shri-zz
Copy link

shri-zz commented Jun 22, 2020

Does this issue reproduce with the latest release?

Yes (verified by looking at the source code)

What did you do?

Run the stack tool on a dump file created when a Go process got a SIGABRT.

What did you expect to see?

A single summary to be printed for all the goroutine stack traces.

What did you see instead?

Multiple summaries were displayed. This makes it hard to determine, for example, the callstack that is most common in the dump file.

The reason is that the "package" and "function" parts of the regexp in "reCall" in https://github.com/golang/tools/blob/master/internal/stack/parse.go do not include a hyphen. However, the compiler can use hyphens for internally generated function names as discussed in https://stackoverflow.com/questions/32925344/why-is-there-a-fm-suffix-when-getting-a-functions-name-in-go.

@cagedmantis cagedmantis changed the title tools/internal/stack does not support hyphenated identifiers x/tools/internal/stack: hyphenated identifiers not supported Jun 25, 2020
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Jun 25, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jun 25, 2020
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 25, 2020
@cagedmantis
Copy link
Contributor

/cc @golang/tools-team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants