jack2 icon indicating copy to clipboard operation
jack2 copied to clipboard

[RFC][WIP] posix: Set mutex type to PTHREAD_MUTEX_ERRORCHECK

Open fps opened this issue 5 years ago • 1 comments

When looking for a way to debug the deadlock in https://github.com/jackaudio/jack2/issues/395 I stumbled across this advisory:

https://wiki.sei.cmu.edu/confluence/display/c/POS04-C.+Avoid+using+PTHREAD_MUTEX_NORMAL+type+mutex+locks

In the end it didn't detect the deadlock (which is not a proof of it not existing) but I'll leave the PR here for your consideration. Might be helpful in the future..

fps avatar Jul 09 '20 05:07 fps

having it always on is not the most useful, do we really need it all the time? If you wrap it around a #ifdef BUILD_DEBUG (so that debug builds have it, otherwise everything still the same) I will merge the PR. thanks!

falkTX avatar Oct 11 '20 20:10 falkTX