PureGo Version
v0.9.0
Operating System
Go Version (go version)
go1.25.1
What steps will reproduce the problem?
Run the following code:
package main
import (
"fmt"
"syscall"
)
func main {
_, _, err := syscall.AllThreadsSyscall(syscall.SYS_FCNTL, 0, 0, 0)
fmt.Println("error:", err)
}
What is the expected result?
error: operation not supported
What happens instead?
panic: doAllThreadsSyscall not supported with cgo enabled
Anything else you feel useful to add?
syscall.AllThreadsSyscall returns ``syscall.ENOTSUPiscgo_libc_setegid` is defined in `runtime/cgo`. If it is not defined, it goes ahead with the operation but panicking if the `runtime/cgo` defines `iscgo`.
fakecgo does not define cgo_libc_setegid but defines iscgo, so syscall.AllThreadsSyscall panics.
Note that a similar failure mode is reproduced with syscall.Setegid, and friends.
PureGo Version
v0.9.0
Operating System
Go Version (
go version)go1.25.1
What steps will reproduce the problem?
Run the following code:
What is the expected result?
error: operation not supportedWhat happens instead?
panic: doAllThreadsSyscall not supported with cgo enabledAnything else you feel useful to add?
syscall.AllThreadsSyscall returns ``syscall.ENOTSUP
iscgo_libc_setegid` is defined in `runtime/cgo`. If it is not defined, it goes ahead with the operation but panicking if the `runtime/cgo` defines `iscgo`.fakecgo does not define
cgo_libc_setegidbut definesiscgo, sosyscall.AllThreadsSyscallpanics.Note that a similar failure mode is reproduced with syscall.Setegid, and friends.