Sharvin Neve created a merge request: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1479

Project:Branches: Sharvin/rtems:fix-regulator-error-assertions to 
rtems/rtos/rtems:main
Author:   Sharvin Neve



Closes #5747.

- In `_Regulator_Output_task_body()`: `rtems_message_queue_receive()` returns
  `RTEMS_UNSATISFIED` when the queue contains fewer messages than
  `maximum_to_dequeue_per_period`. That is the expected condition ending the
  dequeue loop for that period; asserting strictly `RTEMS_SUCCESSFUL` causes an
  assertion failure on every empty or partially-filled period under 
`RTEMS_DEBUG`.
  Update the assertion to accept both `RTEMS_SUCCESSFUL` and 
`RTEMS_UNSATISFIED`.

- In `_Regulator_Free_helper()`:
  - Guard task deletion so `rtems_task_delete()` is not invoked on an already
    exited delivery task (`delivery_thread_has_exited == true`) or an invalid 
task ID.
  - In `rtems_regulator_create()`, if `rtems_message_queue_construct()` fails,
    `message_queue_storage` was allocated via `malloc()` while `queue_id` is 0.
    Directly free `message_queue_storage` in `_Regulator_Free_helper()` if 
`queue_id == 0`.
  - Guard `messages_partition_id` deletion against 0 and explicitly free 
`message_memory`.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1479
You're receiving this email because of your account on gitlab.rtems.org. 
Unsubscribe from this thread: 
https://gitlab.rtems.org/-/sent_notifications/5-258ov4rjqt447ru90rsmdbcjk-1d/unsubscribe
 | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | 
Help: https://gitlab.rtems.org/help


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to