cmd/compile: ICE on deferred call to syscall.LazyDLL.Call #44415
Comments
Note that the dll and proc instantiation should probably be outside the function, something like:
But, it looks like a compiler bug nevertheless. |
Error message looks the same as #44355. |
Thanks for the detailed issue. I think you're right that this is a duplicate of #44355. I'll close this in lieu of that issue. I think this is an interesting case to mention there though. |
Issue #44355 is pretty narrow: it should only affect inlinable functions that explicitly name all of their result parameters as blank (i.e., It would be great to have a standalone reproducer for this issue. Ideally one that can be built from Linux (e.g., using (FWIW, "Value live at entry" is a pretty generic catch-all failure that happens later in the compiler when almost anything goes wrong in the frontend and we didn't catch it sooner to give a more descriptive error report. So I don't recommend using that alone to deduplicate issues.) |
Windows reproducer (based on the initial cause in https://github.com/moonD4rk/HackBrowserData/blob/6a11361e1dbf0c3e455ccb06a4f31d073f7d8e8e/core/decrypt/decrypt_windows.go):
|
Thanks @egonelbre! Further minimized, and confirmed it reproduces on Linux with
Notably, it doesn't reproduce with /cc @cuonglm |
Oh, in the fix for #24491, we only fixed direct function calls. We forgot that for method calls, there's a receiver argument that needs to be passed through the wrapper function too. |
@gopherbot Backport to Go 1.16. Compiler crash on valid Windows code that compiled with Go 1.15. |
@mdempsky I think you have to say "please" or the gopherbot won't listen to you. A somewhat questionable design decision... |
@gopherbot Please backport to Go 1.16. Compiler crash on valid Windows code that compiled with Go 1.15. |
Backport issue(s) opened: #44463 (for 1.15), #44464 (for 1.16). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
Change https://golang.org/cl/294849 mentions this issue: |
What version of Go are you using (
go version
)?go version go1.16 windows/amd64
Does this issue reproduce with the latest release?
Yes, it does
What operating system and processor architecture are you using (
go env
)?What did you do?
My previous version is Go 1.15.6 and everything is ok.
I updated my Go and my func can not build with the lastest version:
What did you expect to see?
My func can run and build with my Go
What did you see instead?
proj-path/core/browsers/decrypt
core\browsers\decrypt\decrypt_windows.go:89:2: internal compiler error: 'wrap·2': Value live at entry. It shouldn't be. func wrap·2, node procLocalFree, value v35
Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
core\browsers\decrypt\decrypt_windows.go:75:2: internal compiler error: 'wrap·1': Value live at entry. It shouldn't be. func wrap·1, node procLocalFree, value v35
Please file a bug report including a short program that triggers the error.
https://golang.org/issue/new
Desc:
decrypt_windows.go:89 is line
defer procLocalFree.Call(uintptr(unsafe.Pointer(outBlob.pbData)))
decrypt_windows.go:75 is line
func DPApi(data []byte) ([]byte, error) {
The text was updated successfully, but these errors were encountered: