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/internal/abi: "panic: Offset changed from 0 to 16" in test/abi/bad_select_crash.go on Windows #45465
Comments
A spent a little while this morning looking at this and I am mystified. I can reproduce this on linux with GOEXPERIMENT=regabi,regabiargs GOOS=windows go build syscall The assert is taking place while compiling RegEnumKeyEx in zsyscall_windows.go:
and the call to ABIAnalyze that is crashing is on the signature for Syscall9. Here is the output of ABIAnalyzeFuncType for the func:
This looks fine. For the first parameter, updateOffset calls a.FrameOffset(), which correctly returns a value of 16; the existing setting of zero for f.Offset is incorrect. The question is, how did that zero get there? It should be types.BOGUS_FUNARG_OFFSET, since the field in question is in a function signature and not in a struct. It appears (at least from what I can see, maybe I am missing something) that something somewhere is updating f.Offset for field between the point in type when it is initialized (with types.BOGUS_FUNARG_OFFSET) and the point where we're looking at it in ABIAnalyze. I have no idea where that is happening, however. @dr2chase maybe you have some idea what is happening? |
I am going to disable the test for the time being just so that the builders can get on track. |
Change https://golang.org/cl/308889 mentions this issue: |
Beat you to the disable. Seems like @mknyszek would have seen this in his Windows work already, but I'll eyeball it anyhow. |
Ah, hypothesis is that we're analyzing the call twice with two different ABIs. That would be worth tracking down. |
Thanks. |
From the debugging code that I added, it looks like this is the first time ABIAnalyze is being called for the type in question. So at least on the surface it doesn't look as though it was previously analyzed under ABI0 , or something like that. |
This tickles some other bug, do this to clear builders. Updates #40724. Updates #45465. Change-Id: Id51efbcf474865da231fcbc6216e5d604f99c296 Reviewed-on: https://go-review.googlesource.com/c/go/+/308889 Trust: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org>
Change https://golang.org/cl/308934 mentions this issue: |
A quick check of the source to run.go suggests that it does not look for the new-style build tags. Updates #45465. Change-Id: Ib4be040935d71e732f81d52c4a22c2b514195f40 Reviewed-on: https://go-review.googlesource.com/c/go/+/308934 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Trust: David Chase <drchase@google.com>
@dr2chase Any updates on this? It's marked as a release-blocker for Go 1.17. |
It's fixed, sorry: |
Change https://golang.org/cl/310649 mentions this issue: |
https://build.golang.org/log/af0f875aa5ce2feb49d0fcf13d1c4643b51815e1:
This test has been consistently failing on the
windows-amd64-2016
andwindows-amd64-longtest
builders since CL 308309, which makes the Windows TryBots and SlowBots much less useful for testing other changes.The regression may have been partially masked by an earlier
longtest
break at CL 307818 (fixed in CL 308469), and by #45456 (fixed in CL 308653).CC @dr2chase @thanm @cherrymui @golang/release
The text was updated successfully, but these errors were encountered: