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: DWARF locations for .closureptr synthetic var are not correct #67918

Closed
thanm opened this issue Jun 10, 2024 · 1 comment
Closed
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. Debugging FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@thanm
Copy link
Contributor

thanm commented Jun 10, 2024

The recently submitted CL https://go.dev/cl/586975 adds support to the Go compiler for emitting a compiler-synthesized ".closureptr" variable within functions corresponding to range func bodies; this variable is used to store a pointer to the yield func being passed in, which the debugger needs to know in order to connect up variable refs in the range body with their corresponding definitions in the outer func.

Turns out that the DWARF location expressions emitted for this var are not correct; because the ctxt arrives in a registers, there is a window within the func prolog where the debugger needs to pick it out of the reg as opposed to its spill location on the stack. This issue is to track this problem, which needs to be resolved before we ship the release.

It should be possible to augment the existing debug infrastructure developed for the register ABI (see issue #45720) to tackle this problem.

@thanm thanm added NeedsFix The path to resolution is known, but the work has not been done. Debugging release-blocker labels Jun 10, 2024
@thanm thanm added this to the Go1.23 milestone Jun 10, 2024
@thanm thanm self-assigned this Jun 10, 2024
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jun 10, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/591595 mentions this issue: cmd/compile/internal/ssa: fix DWARF location expr for .closureptr

@dmitshur dmitshur added the FixPending Issues that have a fix which has not yet been reviewed or submitted. label Jun 10, 2024
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. Debugging FixPending Issues that have a fix which has not yet been reviewed or submitted. NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
Status: Done
Development

No branches or pull requests

3 participants