You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dmitshur
added
NeedsFix
The path to resolution is known, but the work has not been done.
and removed
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
labels
Aug 5, 2022
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Looking at the code in https://github.com/golang/go/blob/master/src/debug/pe/file.go#L325 , the debug/pe package detects if the file is a PE or PE+ executable by looking at the machine type. However, this is not fully correct. According to the spec (https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#optional-header-image-only), the type of executable should be determined by looking at the first two bytes of the optional header, which should contain 0x10b for PE or 0x20b for PE+. Probably if the machine is 64 bits that implies PE+, but maybe that's not true in 100% of the cases.
What did you expect to see?
NA
What did you see instead?
NA
The text was updated successfully, but these errors were encountered: