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
x/sys/windows: FormatMessage can't accept a DLL handle on 64-bit systems #11147
Comments
Go 1.3.3 is old and unsupported. Please try with Go 1.4.2 or ideally Go tip and report back. |
The same issue clearly exists in master: https://github.com/golang/sys/blob/master/windows/zsyscall_windows.go#L476 go/src/syscall/zsyscall_windows.go Line 243 in f9ed2f7
edit: To be clear, the issue is just that |
The syscall package is frozen, but we can fix the problem in |
My mistake. I am 386 person. Any suggestion on what to do about syscall.FormatMessage are welcome. I cannot see what we could do besides documenting the bug. Alex |
@alanctgardner here https://go-review.googlesource.com/11165 is the change. Will that work for you? Alex |
Looks good @alexbrainman, thanks for the fix! |
CL https://golang.org/cl/11165 mentions this issue. |
CL https://golang.org/cl/12067 mentions this issue. |
Second FormatMessage parameter lpSource is uintptr not uint32. Update golang/go#11147. Change-Id: Icaa67abaed93efdad41564b21f8e511e8f9694b1 Reviewed-on: https://go-review.googlesource.com/11165 Reviewed-by: Yasuhiro MATSUMOTO <mattn.jp@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
go1.3.3 windows/amd64
Windows x86-64
Try to call syscall.FormatMessage with a DLL handle.
FormatMessage should accept a syscall.Handle or a uintptr so the cast to uint32 doesn't have to happen.
5.What did you see instead?
FormatMessage returns an error because the truncated pointer doesn't point to a DLL.
The text was updated successfully, but these errors were encountered: