Print this page
3830 SIGQUEUE_MAX's limit of 32 is too low
*** 2371,2382 ****
}
}
return (0);
}
! #ifndef UCHAR_MAX
! #define UCHAR_MAX 255
#endif
/*
* The entire pool (with maxcount entries) is pre-allocated at
* the first sigqueue/signotify call.
--- 2371,2382 ----
}
}
return (0);
}
! #ifndef INT_MAX
! #define INT_MAX 2147483647
#endif
/*
* The entire pool (with maxcount entries) is pre-allocated at
* the first sigqueue/signotify call.
*** 2387,2401 ****
size_t i;
sigqueue_t *sq, *next;
sigqhdr_t *sqh;
i = (maxcount * size) + sizeof (sigqhdr_t);
! ASSERT(maxcount <= UCHAR_MAX && i <= USHRT_MAX);
sqh = kmem_alloc(i, KM_SLEEP);
! sqh->sqb_count = (uchar_t)maxcount;
! sqh->sqb_maxcount = (uchar_t)maxcount;
! sqh->sqb_size = (ushort_t)i;
sqh->sqb_pexited = 0;
sqh->sqb_sent = 0;
sqh->sqb_free = sq = (sigqueue_t *)(sqh + 1);
for (i = maxcount - 1; i != 0; i--) {
next = (sigqueue_t *)((uintptr_t)sq + size);
--- 2387,2401 ----
size_t i;
sigqueue_t *sq, *next;
sigqhdr_t *sqh;
i = (maxcount * size) + sizeof (sigqhdr_t);
! ASSERT(maxcount <= INT_MAX);
sqh = kmem_alloc(i, KM_SLEEP);
! sqh->sqb_count = maxcount;
! sqh->sqb_maxcount = maxcount;
! sqh->sqb_size = i;
sqh->sqb_pexited = 0;
sqh->sqb_sent = 0;
sqh->sqb_free = sq = (sigqueue_t *)(sqh + 1);
for (i = maxcount - 1; i != 0; i--) {
next = (sigqueue_t *)((uintptr_t)sq + size);