x/sys/unix: IoctlGetInt broken on 64-bit big-endian platforms #60429
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?(using QEMU on an amd64 host)
What did you do?
What did you expect to see?
Same number twice, as on amd64:
What did you see instead?
The first number is 101994<<32. I believe this happens because IoctlGetInt passes a pointer to a Go int to the system call:
The ioctl system call expects a pointer to a C int. Passing a Go int means it stores the pgid in the upper 32 bits.
Note that IoctlSetPointerInt passes a pointer to an int32:
The text was updated successfully, but these errors were encountered: