| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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 ssize_t so the sentinel compares as negative while the struct layout stays the same.
| Back | FazBrowse Home | New Git URL |
tfd_count is declared size_t (dproc.c:97), but process_id() uses -1 as its "no fdinfo" sentinel (dproc.c:1222). It becomes SIZE_MAX, so the fi.tfd_count > 0 guard passes where the != -1 siblings skip, and snp_eventpoll() qsorts SIZE_MAX entries of a 32-entry array:
This hits any run with OffType != OFFSET_FDINFO that reports a process holding an epoll descriptor. Declaring it int matches tfds[] and the eventfd_id/pid sentinels.