x/sys/unix: offs2lohi is incorrect, causing Pwritev to fail on linux/arm #57291
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?But for
sys/unix
:Does this issue reproduce with the latest release?
n/a
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://go.dev/play/p/Q97xfv0JM07
What did you expect to see?
What did you see instead?
The problem is that offs2lohi shifts by
unix.SizeofLong
which is the size in bytes, not bits. So it's shifting by 4 or 8, not 32 or 64. But we actually don't need to useSizeofLong
because the man pages state that we simply split the 64-bit offset into its 32-bit halves.The text was updated successfully, but these errors were encountered: