Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testscript: fix ptyName() returning /dev/pts/4294967296 on s390x
Use uint32 instead of uint (64-bit in Go on s390x) to store the return value of the TIOCGPTN syscall. This is to avoid the 32-bit value from being stored into a 64-bit buffer and get left-shifted by 32 when dereferencing, turning what should be /dev/pts/1 to /dev/pts/4294967296 on big-endian architectures such as s390x. Special thanks to the explanation and a similar bug fix provided at containerd/console#51
- Loading branch information