[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] Runtime Errors
From: |
Raghav Gururajan |
Subject: |
Re: [Linphone-developers] Runtime Errors |
Date: |
Fri, 03 Apr 2020 15:11:12 +0000 |
Hello Greg!
> Probably you know this, but the pthreads/mutex specs are pretty
> unforgiving. Many things, including destroying a locked mutex, are
> undefined behavior. Some systems seem to be set up to basically ignore
> those things, and somesystems seem to be set up to basically assert on
> undefined behavior. NetBSD used to assert, and then ran into too many
> problems with incorrect code that worked on Linux (and therefore did not
> get fixed), and I think we changed those to ignore.
>
> 1) you may have a runtime switch (env var) to control asserting vs
> reporting vs ignoring on undefined behavior. An example, perhaps useful
> only as a hint of what to look for:
> https://netbsd.gw.com/cgi-bin/man-cgi?pthread+3+NetBSD-current
>
> 2) it may be possible to add a breakpoint for that error case and figure
> out why the mutex wasn't unlocked before being destroyed.
Thanks so much for the detailed info. I will look into this. :-)
> (I don't know if this is fixed post 4.1.1.)
I think this commit
(https://gitlab.linphone.org/BC/public/linphone-desktop/commit/6b6697f7293e35c98ee1fd5ed38ba541aa051428)
is the fix, but not sure.
Regards,
Raghav Gururajan.