authorgravatar for pat.github@tullmann.orgPat Tullmann <pat.github@tullmann.org> 2025-04-08 14:03:31-07:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-09 16:37:58+02:00
log991560fb499afcbd7717f86edd475338c7d8d2b8
tree4341a2205e6e96016e343d50167c230a0cd63949
parentf4e3631655c93ba31b768b7d232a305419c0fe67

linux.zig: epoll_wait: pass kernel sigset size

Linux kernel syscalls expect to be given the number of bits of sigset that they're built for, not the full 1024-bit sigsets that glibc supports. I audited the other syscalls in here that use `sigset_t` and they're all using `NSIG / 8`. Fixes #12715

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/os/linux.zig+1-1
......@@ -2242,7 +2242,7 @@ pub fn epoll_pwait(epoll_fd: i32, events: [*]epoll_event, maxevents: u32, timeou
22422242 @as(usize, @intCast(maxevents)),
22432243 @as(usize, @bitCast(@as(isize, timeout))),
22442244 @intFromPtr(sigmask),
2245 @sizeOf(sigset_t),
2245 NSIG / 8,
22462246 );
22472247}
22482248