From fdebebf58f75c6ce19bf6d8b7674609c2686f60a Mon Sep 17 00:00:00 2001 From: Daeho Ro <40587651+daeho-ro@users.noreply.github.com> Date: Tue, 11 Aug 2026 21:16:19 +0900 Subject: [PATCH] [linux] fix segfault when eventpoll fdinfo is unavailable process_id() pre-fills -1 sentinels for the oty == 0 case, but tfd_count is size_t, so -1 becomes SIZE_MAX and the `fi.tfd_count > 0` guard passes where the `!= -1` siblings skip. snp_eventpoll() then qsorts SIZE_MAX entries of a 32-entry array. Declare it int, matching tfds[], the snp_eventpoll() parameters and the eventfd_id/pid sentinels. --- lib/dialects/linux/dproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dialects/linux/dproc.c b/lib/dialects/linux/dproc.c index 7757d042..c6488a15 100644 --- a/lib/dialects/linux/dproc.c +++ b/lib/dialects/linux/dproc.c @@ -94,7 +94,7 @@ struct l_fdinfo { #define EPOLL_MAX_TFDS 32 int tfds[EPOLL_MAX_TFDS]; - size_t tfd_count; + int tfd_count; }; /*