-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: bad line number assigned to instruction #53456
Comments
/cc @randall77 @griesemer |
My version is go1.18.1 and I had the same problem. I tested between different versions and it seems that this problem was only discovered after go 1.16? |
Change https://go.dev/cl/417076 mentions this issue: |
I plan to wait till 1.20, unless perhaps we backport it into a dot release of 1.19. |
I think the fix is safe to backport to 1.18/1.19 if we really wanted to, but it doesn't seem to meet the bar for meriting a backport if we haven't found the issue until now. (I suspect it was introduced in Go 1.17, due to the large refactoring that broke up cmd/compile into multiple subpackages.) |
Looks like the fix is failing on linux-ppc64-buildlet: https://build.golang.org/log/52b5e5dc32bb556730136131f90111ebc7ec9c71
|
It looks like it's because
Edit: Nevermind, I overlooked that testGoArch() could be overridden with a flag. Just updating the switch seems best for now. |
Change https://go.dev/cl/422957 mentions this issue: |
Compiling the following with
-gcflags='all=-N -l'
:Produces a binary for main.(*T).Inc with this:
The instruction at 0x45fd48 which passes
key
to mapaccess1_fast64 is assigned the function's header as its line number instead of the statement it belongs to.ref. go-delve/delve#3033
cc @dr2chase
The text was updated successfully, but these errors were encountered: