Make cgo psx_syscall variant crash like runtime.AllThreadsSyscall

When a syscall that yields different return values is called from
the Go psx.Syscall*() API, we want to mirror the behavior of the
native golang runtime.AllThreadsSyscall() function.

The previous inconsistency was pointed out by Lorenz Bauer in:

[I decided to defer this change until 2.63, and not include this
in the bug-fix for 215283, on the grounds it is a slight
incompatibility in runtime behavior, and wanted to give folk an
opportunity to plan for it. This new behavior enforcement will
crash an unprepared go program.]

Signed-off-by: Andrew G. Morgan <>
9 files changed