davids5 commented on code in PR #8951:
URL: https://github.com/apache/nuttx/pull/8951#discussion_r1157074834
##########
sched/semaphore/sem_holder.c:
##########
@@ -103,20 +103,18 @@ nxsem_allocholder(FAR sem_t *sem, FAR struct tcb_s *htcb)
{
serr("ERROR: Insufficient pre-allocated holders\n");
pholder = NULL;
- DEBUGPANIC();
}
- if (pholder != NULL)
- {
- pholder->sem = sem;
- pholder->htcb = htcb;
- pholder->counts = 0;
+ DEBUGASSERT(pholder != NULL);
Review Comment:
If we can run out of holder 2 ways here. Why leave this debug detection
only? The following code will corrupt memory. Not having enough holders, if it
were survivable will still cause PI issues,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]