Yang Zhang created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1493
Project:Branches: Chloe/rtems:fix-mutex-init-flags to rtems/rtos/rtems:main Author: Yang Zhang ## Summary Previously, pthread_mutex_init() wrote the object flags containing POSIX_MUTEX_MAGIC before validating the priority ceiling attribute. If the priority ceiling was invalid, the function returned EINVAL, but left the mutex object marked as a valid initialized mutex. Subsequent calls such as pthread_mutex_trylock() and pthread_mutex_destroy() then mistakenly accepted the object and returned EBUSY, or pthread_mutex_lock() triggered a fatal data abort due to uninitialized queues. Defer modifying the mutex object and setting the flags until after all attribute validations (including priority ceiling) have succeeded, and publish the flags after the mutex queue and control fields are initialized. Also add test coverage in psx05. Close #5776. ## Generative AI None -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1493 You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-5i1ocm7vehatrn2zl59dyrazn-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
