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

cmd/compile: unnecessary internal variables are exported to DWARF for range-over-func loops #68238

Closed
aarzilli opened this issue Jun 28, 2024 · 1 comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@aarzilli
Copy link
Contributor

The compiler exports to DWARF a variety of internal variables (#state, #next, parameters) for range-over-func loops that exist to facilitate the implementation of range-over-func but have no value for users.
These should probably not be exported.

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jun 28, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/594257 mentions this issue: cmd/compile: drop internal range-over-func vars from DWARF output

@thanm thanm added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 28, 2024
@thanm thanm added this to the Go1.23 milestone Jun 28, 2024
Mchnan pushed a commit to Mchnan/go-sylixos that referenced this issue Jul 9, 2024
Drops internal range-over-func variables from the DWARF output
(excluding #yield which is used by Delve).

Fixes golang#68238

Change-Id: Ic035e37ca3560347276cdc3b469fd564da33f4f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/594257
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Auto-Submit: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants