mirror of https://github.com/asterisk/asterisk
main/lock: log failed mutex unlock in non-DEBUG_THREADS builds In non-DEBUG_THREADS builds, a failed pthread_mutex_unlock() is silent, so an unlock by a non-owning thread leaves the mutex locked and the only symptom is a later hang. Log an error naming the mutex, file, line and function when the unlock fails. The success path costs one branch. Tested on 20.21.0 with a throwaway module covering both a never-locked unlock and a cross-thread unlock. AI assistance: Claude (Anthropic) helped draft this. I reviewed and tested the change. Resolves: #2233pull/2322/head
parent
e203d0a9c5
commit
ab0240a91b
Loading…
Reference in new issue